You have to move the relevant bitmaps into the relevant subfolders tooLordMuffe 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.
Automagical resources.lua
Moderator: Moderators
Re: Automagical resources.lua
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Automagical resources.lua
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
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 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.Does it recursively grab subdirectories beneath it?
Re: Automagical resources.lua
thanks, i forgot the folders. Works fine now.
A really helpful piece of code :)
A really helpful piece of code :)
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Automagical resources.lua
Neato, thanks for answers 

- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Automagical resources.lua
Doesn't work. I did as argh just mentioned and none of the graphics show up anymore.
Re: Automagical resources.lua
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?
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?
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Automagical resources.lua
Yep, and the graphics on my ceg's promptly disappeared.
Re: Automagical resources.lua
You don't get any errors in the infolog?
Re: Automagical resources.lua
Pastebin your old resources.tdf
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Automagical resources.lua
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.plasmatexture=plasmashot3.tga;
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Automagical resources.lua
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
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...
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Automagical resources.lua
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.

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.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Automagical resources.lua
Deleted the overlaps. No change.
check these pictures out
http://www.evolutionrts.info/random/resourceslua
check these pictures out
http://www.evolutionrts.info/random/resourceslua
Re: Automagical resources.lua
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
#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.
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

#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.