How to do it?
What files are needed and where is the place to get these files from?
Edit: Attached a ready to go version of lups (REMEMBER TO EDIT THE CONFIG FILES IN LUAUI/CONFIGS AS NEEDED!)
Installing lups from scratch
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Installing lups from scratch
- Attachments
-
- lups.7z
- Just unzip this to your .sdd and all will be well (lups will be installed)
- (586.74 KiB) Downloaded 19 times
Last edited by Forboding Angel on 08 Mar 2011, 03:38, edited 1 time in total.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Installing lups from scratch
Yes I found it.
For those who are looking for an actual answer to this question (in other words, how the fuck is a newbie content dev going to know where the fucking lups directory is?):
The files referenced here can be obtained via the ZeroK / CA source
https://code.google.com/p/zero-k/
For those who are looking for an actual answer to this question (in other words, how the fuck is a newbie content dev going to know where the fucking lups directory is?):
The files referenced here can be obtained via the ZeroK / CA source
https://code.google.com/p/zero-k/
lups readme wrote:
Lua Particle System (LUPS)
Licensed under the terms of the GNU GPL, v2 or later.
** Implementation **
First, you need to differ between synced and unsynced FX,
so there are 2 LUPS instances running:
one in LuaUI (widget) and
one in LuaRules (gadget).
(To start a new instance simply include lups/lups.lua)
** Why differ between synced and unsynced FX? **
LuaUI has only a limited access to engine values, so it
could never determine the unittype of enemy units in airlos,
nor is it able to catch weapon explosion or to interact with
cob.
** Which files are used by LUPS? **
the core uses the following:
lups/*
bitmaps/GPL/lups/*
LuaUI/Widgets/lups_wrapper.lua
LuaRules/Gadgets/lups_wrapper.lua (only if you want synced
FX like shockwaves/nanolasers)
and there are the managers:
LuaUI/Widgets/gfx_lups_manager.lua
LuaRules/Gadgets/gfx_lups_manager.lua
the shockwaves gadget:
LuaRules/Gadgets/lups_shockwaves.lua
** What are those managers? **
LUPS itself doesn't start any FX. It needs other lua files
to tell LUPS when it should start a new FX.
There are many widgets and gadgets, which start LUPS FXs,
but the most interesting ones are the managers (and perhaps
the shockwaves gadget).
Also the manager in LuaRules differ from that one in LuaUI.
The manager in LuaUI starts FXs everytime an new unit gets
finished or an enemy unit enters the LOS, so those FX only
vanish if the unit dies or leaves the LOS again.
The LuaRules manager is much less customizable, it creates
very special FXs like cloaking and it also manage parts of
the LUPS nano particle handling.
** How do I implement my own FX? **
Okay, in the case you use the LuaUI manager and you want to
create a per-unit FX (like a fusion FX, airjets, ...):
1. open LuaUI/Widgets/gfx_lups_manager.lua
(don't shock the file seems huge, but most is only config,
and yeah it needs a cleanup ... someday)
2. scroll down (~50% scrollbar)
you will find the following table/array:
"local UnitEffects = {...}"
It holds the FX per-unitdef.
3. create a new sub-table like the following:
[UnitDefNames["%UNITDEF_NAME%"].id] = {
{class='%FXCLASS%',options=%MY_FXOPTIONS_TABLE%}
},
** What FXClasses exist and how do I know their options? **
All FXClasses are located here:
/lups/ParticleClasses/*
If you open on of those files, you will see a function like this:
function ShieldSphereParticle.GetInfo()
return {
name = "ShieldSphere",
}
end
That returned name is what you fill in %FXCLASS% (uppercase
doesn't matter), also it is in most cases same as the filename.
To see possible options of the FXClass scroll a bit down, you
will find a table like this:
ShieldSphereParticle.Default = {
pos = {0,0,0}, -- start pos
layer = -23,
life = 0, --in frames
size = 0,
sizeGrowth = 0,
margin = 1,
colormap1 = { {0, 0, 0, 0} },
colormap2 = { {0, 0, 0, 0} },
repeatEffect = false,
}
The table contains all options and their default values.
So an example fx placed in LuaUI/Widgets/gfx_lups_manager.lua
could look like this:
[UnitDefNames["armcom"].id] = {
{class='ShieldSphere',options={ life=3000, repeatEffect=true, size=300, colormap1={1,0,0,0.5}, colormap2={0,1,0,0.5} } }
},
** How do I start my own FX from my widget/gadget? **
First, you need a link to the interface, to do so you need
to access the global shared table of the widget-/gadgetHandler.
for LuaUI:
local LupsApi = WG.Lups
for LuaRules:
local LupsApi = GG.Lups
(nil check those, it is possible that Lups hasn't started yet!)
That Api contains the following functions:
LupsApi.GetStats()
LupsApi.GetErrorLog(minPriority)
-> LupsApi.AddParticles(class,options) //returns a fxID
-> LupsApi.RemoveParticles(fxID)
LupsApi.AddParticlesArray({ {class=className, ..FX options..},{class=className, ..FX options..},.. } )
LupsApi.HasParticleClass(className)
and
LupsApi.Config = {...} //contains the options of lups.cfg
** Example usage of AddParticles() **
LupsApi.AddParticles('ShieldSphere', {
unit=unitID,
piece="head",
pos={0,100,0},
life=3000,
repeatEffect=true,
size=300,
colormap1={1,0,0,0.5},
colormap2={0,1,0,0.5}
})
** How do I bind a FX to an unit/unitpiece? **
There are some special options tags, those are:
unit := binds fx to unitID
piece:= binds fx to pieceNAME
pos := worldspace coord or offset coord from the unit/unitpiece center
onActive := only show FX if the unit is active (e.g. used for airjets - a plane is active, if it flies)
** Can I modify FX on runtime? **
Sure you can. There is only one issue in 76b1 (it will
be fixed in the next spring release):
you can't modify widgets if they are in a .sdd, so you
have to copy it to your local widgets folder,
then you can run:
/luaui reload
each time you modified the file.
** I heard some options can contain Lua code? **
Yeah, but only the SimpleParticles class support them and
_only_ in the "partpos" param:
LupsApi.AddParticles('SimpleParticles', {
...
partpos = "r*cos(beta)*sin(alpha),r*cos(alpha),r*sin(beta)*sin(alpha) | r=random()*20, alpha=2*math.pi*random(), beta=2*math.pi*random()"
...
})
The syntax is a bit extended so it looks similar to the
definitions of a mathical sets, but it can still contain
any lua code.
Valid examples are:
"x,y,z | x=10,y=30,z=0"
"10,30,0"
"random(),random(),random()"
"x,y,z | r=random(), if (r>10) then x=10; y=30; z=0; else x=-10; y=-30; z=-0; end"
Re: Installing lups from scratch
how the fuck is a newbie content dev going to know that something like lups exists? Oh by the "use lups" one liner replies in forum. Well, those suck just as much as the "use chili" answers.(in other words, how the fuck is a newbie content dev going to know where the fucking lups directory is?):
Tbh i always thought lups was kinda meh but now that i read
** Can I modify FX on runtime? Sure you can.**
it might have some advantage over CEG.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Installing lups from scratch
added 7z of lups to first post.
Re: Installing lups from scratch
Is that really being said? I don't see it happening.knorke wrote: Oh by the "use lups" .. as the "use chili" answers.
Re: Installing lups from scratch
dec, 2010.
User is using redui, people suggest using other ui packages including ice ui. User already is capable of setting up a ui framework.
Demonstration of chilli skining, nothing saying use chili. Dec 2010.
User is trying to use ice for something probably better suited for by red or chili.
Your examples fail, no one is telling a random noob modder to use chili without the user clearly showing the ability to access a preexisting framework. Also half of your examples are from around 3 months ago.
Re: Installing lups from scratch
3 months isn't that long ago.
lets just leave it at that, nothing will come out of this.
lets just leave it at that, nothing will come out of this.
Re: Installing lups from scratch
Wish there was a all.inclusive- spring devkit lying around.