knorke wrote:There is an icon generator by jK, it makes these images like in avatar.
It is in toolbox:
http://springrts.com/phpbb/viewtopic.php?t=27268
At top of file are the commands to start it. (it can take VERY long to generate all images)
oww, it was here all along!
great, that'll be useful - already added pictures of units that lacked buildicons, such as chickens
knorke wrote:
To make buildpics of features, I would just create a fake unit in _post file of every feature. I do similiar for features that can have animations when they get crushed:
Code: Select all
--create a "death animation unit" for every feature
for name, fd in pairs(FeatureDefs) do
-- Spring.Echo ("feature: " .. ud.name or "nil")
local u = {}
for key,value in pairs(fd) do
u[key]=value
end
--u.filename = "xxx"
u.name = "unit" .. name
u.script = "shatter.lua"
u.objectname = fd.object
u.maxDamage = 1
u.hideDamage = true
u.levelGround=false
UnitDefs [u.name] = u
end
For each feature named "tree" this will give you a unit "unit_tree"
I tried adding a "featuredefs_post.lua" file in the Gamedata folder. However that would just crash telling me that UnitDefs table doesn't exist.
If I put it in the "unitdefs_post.lua" file it would tell me that there is no FeatureDefs table.
I'm trying to put this in the toolboxes Gamedata folder so i don't have to copy/paste it for every mod out there. I did check and it seems that dependencies' gamedata folder gets loaded before toolboxes, so that should be ok. What am I missing here?
knorke wrote:
However, once I actually create that model it gets displayed just fine.
Example youtube video posted, it seems to be the case for all tree features in BA f.e.
You mean the engine trees?
It might be that object3d is nil for them, iirc they use drawType = some number.
Yeah, they seem to have drawType from -1 to #somepositivenumber (exlcluding 0). No idea what to do with that though...
Forboding Angel wrote:It's also very picky and likes to break at the drop of a hat, but it's pretty much the only recourse. Cozy up to infolog.
Have you checked the buildpics in spring features? Chances are, I've probably already generated them.
$ ls
features modinfo.lua objects3d unittextures
I don't see any pictures. I also won't need it if I figure out how to generate units from features as knorke suggested. Also, it's quite an impressive feature pack. I'm thinking of adding it as a default dependency for the scenario editor.