I go ingame with nullai and do /luarules buildicons all without cheats and get no response (no response from "buildicon" either).
According to
Code:
function gadget:RecvLuaMsg(msg, playerID) if (msg:find("buildicon",1,true)) then if (not Spring.IsCheatingEnabled()) then Spring.SendMessageToPlayer(playerID, "Cheating must be enabled");
It should at least report that cheats aren't enabled.
Obviously, with cheats on the results are no different.
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
put both files in mah mod, did /luarules buildicons all some error about corrad nil blabla went to config, replaced unitConfigs= with this:
Quote:
[UnitDefNames.tptank.id] = { --some unit in mah mod scale = 3, rot = 200, clamp = 10, },
now it complains about some missing background image.
probally it will want this too later on: --// faction colors (check (and needs) LuaRules/factions.lua)
anyway, it "does stuff" though to properly work it needs more files. dunno why it does nothing for you, either you did not notice the errors in infolog or something steals your /luarules message
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
did /luarules buildicons tptank and found this in spring-88.0-release\buildicons\_5to4_64x64: in infolog it only said:
Quote:
[f=0000232] Cheating is enabled! [f=0000968] Warning: Couldn't find texture "LuaRules/Images/IconGenBkgs/bg_ground.png"! [f=0001234] offlinetester paused the game
so it does not talk much.
i only did whats written in previous post + copy in (accidently the wrong ) background image.
Quote:
[f=0000000] Failed to load: chickens_unit_spawner_defense.lua ([string "LuaRules/Gadgets/chickens_unit_spawner_defe..."]:277: attempt to index field 'difficulties' (a nil value))
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
put in something like this:
Code:
function gadget:Initialize() Spring.Echo ("IAM HERE") end
see if that prints.
Also look for that buildicons\_5to4_64x64\ folder. When I got it working it just created the icons there, without any message at all. (was a bit surprised)
infolog wrote:
[f=0000340] Cheating is enabled!
So if you now test with cheating all the time, it will never print anything but maybe it already outputs files.
Beside that, no idea. The version from zK you linked worked for me and further than that I can only guess...
comments: Both is correct synthax. Well actually it is --[[ ]] but there is a useful trick that does not work with ]]-- or ]] http://www.lua.org/pil/1.3.html Anyway, that was just funfact
Btw, how long is it supposed to take with /luarules buildicons all ?
/luarules buildicons unitname is almost instant, but now it is hanging spring since 2 minutes and only two icons have appeared so far. Does not seem right? (i guess from spring hanging you can also tell it is working, though some message would be better) /edit: ~7 minutes for 54 icons, then spring closed and infolog was cut off. hm.
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
seems it is normal to take some time:
Quote:
<[LCC]jK> icongen renders more than 1 image per icon (it tries to center icon etc.) gen CA buildicons could take upto 1h btw
if spring closes before it is done: (because it hangs too long or something?)
Quote:
<[LCC]jK> might be not such a bad idea to use the `new` Spring.ResetWatchdog() func <[2up]knorke> just insert it somewhere in loop? <[LCC]jK> yup just add Spring.ClearWatchDogTimer() somewhere in the loop
Joined: 17 Nov 2005, 02:43 Location: Raegquitting Spring on 04/24/12
The problem is that it isn't even receiving the /luarules message. That is the very first part of it, so of course if it doesn't receive the message it won't do anything.
Something else is apparently snatching it. I don't understand it though, because whatever is doing it is not a widget or a gadget as I ahve tried removing all widgets and gadget from the game (save the icongenerator).
Now I'm reaching... could it be the custom handlers? (gadget/widget)
1 Million cookies to whoever figures this out :-/ I have tried everything I can think of.
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
i check-check-checked it out and yes its one/some of the files in LuaRules\ cba to see which one. deleted all the files in LuaRules\ and replaced with the ones from my mod and then it worked.
Joined: 17 Nov 2005, 02:43 Location: Raegquitting Spring on 04/24/12
Thanks knorke. I did more or less the same thing, but I must not have done it right. I was relying on the engine stuff to replace the important bits and I think I probably just messed up. I'll try again.
I was able to transplant parts of evo into toolbox well enough so that I could get new buildpics, but for a lot of reasons I need it working in evo properly.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum