Automagical resources.lua - Page 2

Automagical resources.lua

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

Moderator: Moderators

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Automagical resources.lua

Post 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
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Automagical resources.lua

Post 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
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Automagical resources.lua

Post 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.
LordMuffe
Posts: 286
Joined: 13 Mar 2005, 15:39

Re: Automagical resources.lua

Post by LordMuffe »

thanks, i forgot the folders. Works fine now.

A really helpful piece of code :)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Automagical resources.lua

Post by Forboding Angel »

Neato, thanks for answers :-)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Automagical resources.lua

Post by Forboding Angel »

Doesn't work. I did as argh just mentioned and none of the graphics show up anymore.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Automagical resources.lua

Post 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?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Automagical resources.lua

Post by Forboding Angel »

Yep, and the graphics on my ceg's promptly disappeared.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Automagical resources.lua

Post by Argh »

You don't get any errors in the infolog?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Automagical resources.lua

Post by FLOZi »

Pastebin your old resources.tdf
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Automagical resources.lua

Post by Forboding Angel »

User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Automagical resources.lua

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Automagical resources.lua

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Automagical resources.lua

Post 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...
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Automagical resources.lua

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Automagical resources.lua

Post by Forboding Angel »

Deleted the overlaps. No change.

check these pictures out

http://www.evolutionrts.info/random/resourceslua
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Automagical resources.lua

Post 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.
Post Reply

Return to “Lua Scripts”