Buildpic Generator - Page 2

Buildpic Generator

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Buildpic Generator

Post by Forboding Angel »

infolog wrote:[ 146] /luarules buildicons all
[ 147] gl.ActiveFBO: error(2) = [string "LuaRules/Configs/icon_generator.lua"]:68: attempt to index local 'a' (a nil value)
[ 147] LuaRules::RunCallIn: error = 2, DrawGenesis, [string "LuaRules/Configs/icon_generator.lua"]:68: attempt to index local 'a' (a nil value)
I get a crapload of these. So what does all that mean? At least now it's saying somehting in infolog, that's progress.
icon_generator.lua
(8.18 KiB) Downloaded 107 times
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Buildpic Generator

Post by lurker »

You need to include factions.lua in your gadget handler or disable the sorts using factions.

An alternate to disabling is to alter IsCoreOrChicken to "return a and a.core or a.chicken"
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Buildpic Generator

Post by Argh »

Have you tried my version yet? I got rid of all of that stuff...
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Buildpic Generator

Post by Forboding Angel »

Argh you didn't give me a copy of your config, and just inserting your unit_icongenerator causes me to get the exact same error.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Buildpic Generator

Post by Argh »

Oh. D'uh.... here.

And don't forget, you need to have a bitmap here:

LuaRules/Images/IconGenBkgs/bg_ground.png
Attachments
icon_generator.lua
(4.5 KiB) Downloaded 116 times
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Buildpic Generator

Post by Forboding Angel »

YAY ARGH I LOVE YOU!!!!!!!!!!
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Buildpic Generator

Post by Forboding Angel »

And for all those who need it in the future:

All you have to change is in the config file, where it says per unitdef settings, change the unitname.

For example:

[UnitDefNames.eartytank.id] = { wait = 30 },

The part in red is the unitname.

Then to run it, just start up spring.exe, and in the chat type:
/cheat /luarules buildicons all

The buildicons will be placed in your man spring folder under a folder called "buildicons". Hopefully this saves someone else from all the trouble I went through.
Buildpic Generator.zip
(210.02 KiB) Downloaded 22 times
Post Reply

Return to “Lua Scripts”