Page 2 of 2

Re: Automagical resources.lua

Posted: 15 Feb 2010, 23:02
by FLOZi
LordMuffe wrote:Could somebody explain me how to get this thing to work?

Preferably in a way that someone without any knowledge of LUA (me) can understand?

I added the linked file into my /gamedata folder, but it seems I miss something, because spring just acts like it would not have a resource file.
You have to move the relevant bitmaps into the relevant subfolders too

Re: Automagical resources.lua

Posted: 16 Feb 2010, 06:12
by Forboding Angel
I could use som more info as well. Does it matter if I take all my current bitmaps and stick them in one of those folders (I don't currently have any folders in bitmaps with those names). Does it recursively grab subdirectories beneath it? etc etc etc

Re: Automagical resources.lua

Posted: 16 Feb 2010, 06:28
by Argh
Does it matter if I take all my current bitmaps and stick them in one of those folders (I don't currently have any folders in bitmaps with those names).
Yes. Stick all the textures that aren't for UI or whatever into either /projectiletextures or /groundfx, voila, done. Beats the hell out of managing resources manually.
Does it recursively grab subdirectories beneath it?
Yes.

Re: Automagical resources.lua

Posted: 16 Feb 2010, 09:46
by LordMuffe
thanks, i forgot the folders. Works fine now.

A really helpful piece of code :)

Re: Automagical resources.lua

Posted: 16 Feb 2010, 09:50
by Forboding Angel
Neato, thanks for answers :-)

Re: Automagical resources.lua

Posted: 08 Mar 2010, 07:41
by Forboding Angel
Doesn't work. I did as argh just mentioned and none of the graphics show up anymore.

Re: Automagical resources.lua

Posted: 08 Mar 2010, 09:24
by Argh
It's still working over here.

In bitmaps/, you made a projectiletextures folder, then put the stuff you normally use for explosions in there?

And you put resources.lua into your gamedata folder?

Re: Automagical resources.lua

Posted: 08 Mar 2010, 12:49
by Forboding Angel
Yep, and the graphics on my ceg's promptly disappeared.

Re: Automagical resources.lua

Posted: 08 Mar 2010, 23:01
by Argh
You don't get any errors in the infolog?

Re: Automagical resources.lua

Posted: 08 Mar 2010, 23:11
by FLOZi
Pastebin your old resources.tdf

Re: Automagical resources.lua

Posted: 09 Mar 2010, 03:23
by Forboding Angel

Re: Automagical resources.lua

Posted: 09 Mar 2010, 04:33
by Argh
plasmatexture=plasmashot3.tga;
Stuff like this can screw it up, I'd think. Names must be identical. But that should just screw up a few things, not everything.

Re: Automagical resources.lua

Posted: 09 Mar 2010, 04:49
by Forboding Angel
Also, another bug I found. All of a sudden when using the lua, the transparency on my bitmaps went away. Not totally, but it's was pretty fuckin ugly.

Re: Automagical resources.lua

Posted: 09 Mar 2010, 07:51
by Argh
That's very strange- you don't happen to have two things with similar names where a namespace collision could have occurred? I.E., "explosion.tga" and "explosion.png" will cause problems. But again... all of them? Or just a few things? The operation of this script shouldn't cause major problems with all of them...

Re: Automagical resources.lua

Posted: 09 Mar 2010, 17:01
by Forboding Angel
Shit. I have a lot of same named stuff in different formats :-(

I'll give it another shot. This is really annoying. It would be nice if for once on thsi engine we could jsut have something that works.

Re: Automagical resources.lua

Posted: 09 Mar 2010, 17:16
by Forboding Angel
Deleted the overlaps. No change.

check these pictures out

http://www.evolutionrts.info/random/resourceslua

Re: Automagical resources.lua

Posted: 09 Mar 2010, 21:41
by Argh
Hrmm. Did you put your groundfx textures in groundfx?

Maybe missing references there are screwing up the rest of the CEGs.

#100 looks like circularthingy isn't being referenced right, or something. Are those spikes or muzzleflares?

#101 is bad texture references. It's interesting that that causes the graph / etc. to print on the texture, though. It's also interesting that that didn't cause a Spring crash :P

#102 looks like it's probably a namespace issue, i.e., you have two versions of something, one with alpha, the other doesn't use alpha, and your CEG is now referencing the wrong one. Note the alpha on the edges.