Chili exploration - Page 1

Chili exploration

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

Moderator: Moderators

EatMyShrapnel
Posts: 31
Joined: 25 Jun 2010, 20:16

Re: UI how to start ?

Post by EatMyShrapnel »

Guys,

first, please give me a link where I can found this ChiliUI. Even S44 don't want chili, for me that's can be a good start to see how stuff works. I search how to start an UI, I found threads related to ICEui, here people said forget it and use Chili, now you speak about new widgethandler.

second, tell me more about the new widgethandler, where i can get information, like a TODO, where i can get documentation how to use it (Doxygen or something like),...

third, it would be cool for people who can to write tutorials in the wiki :
- Hello world
- adding picture
- adding button
- link basic command to a button
- etc.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: UI how to start ?

Post by Satirik »

download and extract Zero-K or GundamRTS both use chili
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: UI how to start ?

Post by FLOZi »

FLOZi wrote:S44 won't be getting a chilli gui until the new widgethandler is ready.

^This doesn't mean you can't try writing one btw, just that it won't be released in S44 main archive.
User avatar
Petah
Posts: 426
Joined: 13 Jan 2008, 19:40

Re: UI how to start ?

Post by Petah »

Forboding Angel wrote:Edit: Also, take it from an sc2 player... the sc2 ui is shit. Don't try to emulate it. Players will hate it.
FFS, not every one is YOU, and a lot of people like the SC2 UI.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: UI how to start ?

Post by Forboding Angel »

Read the entire post, ass.

@shrapnel, same goes for you.
User avatar
KaiserJ
Community Representative
Posts: 3113
Joined: 08 Sep 2008, 22:59

Re: UI how to start ?

Post by KaiserJ »

Forboding Angel wrote:horizontal maneuver zone is 1/3rd bigger than your vertical maneuver zone
this is not really true; although you make a point here about clickable aspect it the offset angle of the camera from 90 degrees (which gives you a roughly square region of the battlefield on a widescreen monitor)

anyways. not a critique thread. lets help him with his gui
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI how to start ?

Post by smoth »

shrap, from memory...
\luaui\widgets\chili\*.*
\luaui\widgets\api_chili.lua
and pretty much every .lua file in
\luaui\
EatMyShrapnel
Posts: 31
Joined: 25 Jun 2010, 20:16

Re: UI how to start ?

Post by EatMyShrapnel »

what i did, but I still have same problem that with iceUI : I don't see Chili in the widget menu (F11). I would like to make a mutator for s44 but I need documentation I don't know which file call wich file and fucntion.. I don't know where I have to say to spring which UI to use etc.. so there is a documentation somewhere ?
EatMyShrapnel
Posts: 31
Joined: 25 Jun 2010, 20:16

Re: UI how to start ?

Post by EatMyShrapnel »

here the trick :
I got chili from zerok, but the folder widget in zerok is written with a small 'w' And spring needs a folder with a cap 'W'. So after renamed
  • /home/user/.spring/LuaUI/widgets
by
  • /home/user/.spring/LuaUI/Widgets
I have the widget in the widgets menu (F11).
Now when i click on they turn in yellow but don't appear on the screen.
EatMyShrapnel
Posts: 31
Joined: 25 Jun 2010, 20:16

Re: UI how to start ?

Post by EatMyShrapnel »

ok always caps problem i renamed :
  • Controls
    Handlers
    Skins
    Headers
    Themes
in
  • /home/user/.spring/LuaUI/Widgets/chili
some chili stuff works some other don't :

Code: Select all

[f=0001499] Loading:  LuaUI/Widgets/gui_chili_facbar.lua
[f=0001499] false
[f=0001499] Error in Initialize(): [string "LuaUI/Widgets/gui_chili_facbar.lua"]:281: attempt to call field 'GetBuildIconFrame' (a nil value)
[f=0001499] Removed widget: Chili FactoryBar
[f=0001593] Loading:  LuaUI/Widgets/gui_chili_minimap.lua
[f=0001593] false
[f=0001593] Error in Initialize(): [string "LuaUI/Widgets/gui_chili_minimap.lua"]:125: attempt to index field 'crude' (a nil value)
[f=0001593] Removed widget: Chili Minimap
EatMyShrapnel
Posts: 31
Joined: 25 Jun 2010, 20:16

Re: UI how to start ?

Post by EatMyShrapnel »

I found a way to work ChiliFactory Bar by replacing

Code: Select all

file2 = WG.GetBuildIconFrame(ud),
with

Code: Select all

file2 = 'LuaUI/Images/nested_buildmenu/frame_Fac.png',
in gui_chili_facbar.lua like someone did in gui_chili_radial_buildmenu.lua

i commented from line 120 to line 126 in gui_chili_minimap.lua and Chiliminimap works but not properly :
Image
As you can see I don't have comands menu...
luckywaldo7
Posts: 1398
Joined: 17 Sep 2008, 04:36

Re: UI how to start ?

Post by luckywaldo7 »

You will need a lot of stuff from 'zk/LuaUI/Images', maybe just copy the whole folder maybe to (You will probably end up using mostly your images in the end anyway).

There is also some necessary files in 'zk/LuaUI/Configs', just take whatever mentions chili.

Not things needed by the chili framework itself but by the various chili widgets that zk packages.
EatMyShrapnel
Posts: 31
Joined: 25 Jun 2010, 20:16

Re: UI how to start ?

Post by EatMyShrapnel »

i think you right, moreover after scrolling in infologs, i saw that i need luarules too. Now I have other errors... well i take a break! :mrgreen: horror movie & coffee time
EatMyShrapnel
Posts: 31
Joined: 25 Jun 2010, 20:16

Re: UI how to start ?

Post by EatMyShrapnel »

Well, i just saw that some lua files use a directory called images and some other use a directory called Images such things should not hapen! I know that windows don't take care about sensitive but linux does! so you should take a decision about caps or not and respect it every where.
EatMyShrapnel
Posts: 31
Joined: 25 Jun 2010, 20:16

Re: UI how to start ?

Post by EatMyShrapnel »

EatMyShrapnel wrote:I found a way to work ChiliFactory Bar by replacing

Code: Select all

file2 = WG.GetBuildIconFrame(ud),
about that i just read :

Code: Select all

NOTE FOR OTHER GAME DEVS:
	ZK uses WG.GetBuildIconFrame to draw the unit type border around buildpics.
	If you're not using them (likely), remove all lines containing that function.
EatMyShrapnel
Posts: 31
Joined: 25 Jun 2010, 20:16

Re: Chili exploration

Post by EatMyShrapnel »

many things works now :
Image
I had to change several stuffs.

Now I have some problem with tooltip if someone can explains to me what do these lines in gui_chili_tip.lua:

Code: Select all

local function GetUnitIcon(ud)

	if not ud then return false end

	return icontypes 

		and	icontypes[(ud and ud.iconType or "default")].bitmap

		or 	'icons/'.. ud.iconType ..iconFormat

end
that can maybe help me. Here the error msg in infologs.txt :

Code: Select all

[f=0040418] Loading:  LuaUI/Widgets/gui_chili_selections_and_cursortip.lua
[f=0040566] false
[f=0040566] Error in Update(): [string "LuaUI/Widgets/gui_chili_tip.lua"]:872: attempt to index field '?' (a nil value)
[f=0040566] Removed widget: Chili Cursor Tip 3
Other problem, when I start the game some chili widgets are in yellow in the widget selector, if i click on to activate them they works. In infologs.txt I have no information about any error or stop. They appear loaded at the start in infolog.txt
another coffee & horror movie break
luckywaldo7
Posts: 1398
Joined: 17 Sep 2008, 04:36

Re: Chili exploration

Post by luckywaldo7 »

That looks like it gets the strategic icon of the unit to use in the tooltip:
screen00032.png
screen00032.png (70.74 KiB) Viewed 4537 times
EatMyShrapnel
Posts: 31
Joined: 25 Jun 2010, 20:16

Re: Chili exploration

Post by EatMyShrapnel »

thx, with your help i fixed the problem :
Image

when I start the game some chili widgets are in yellow in the widget selector, if i click on to activate them they works. In infologs.txt I have no information about any error or stop. They appear loaded at the start in infolog.txt. I did some interesting test :
if I load any chili widget before Chili framework, the widget don't work, this is correct. I think I have to load the framework beofre any widget, but I don't know how to do that
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Chili exploration

Post by jK »

EatMyShrapnel wrote:when I start the game some chili widgets are in yellow in the widget selector, if i click on to activate them they works. In infologs.txt I have no information about any error or stop. They appear loaded at the start in infolog.txt. I did some interesting test :
if I load any chili widget before Chili framework, the widget don't work, this is correct. I think I have to load the framework beofre any widget, but I don't know how to do that
That's why chili needs currently a modified widgetHandler. Chili defines `api=true` in its GetInfo() and CA/ZK's widgetHandler loads those before all others.

(BTW the new widgetHandler will support a much more selective dependency method, similar to the one in gentoo's init.d scripts)
EatMyShrapnel
Posts: 31
Joined: 25 Jun 2010, 20:16

Re: Chili exploration

Post by EatMyShrapnel »

I see :

Code: Select all

[f=0000000] Loaded API widget:  Shared Functions    <api_shared_functions.lua>
[f=0000000] Loaded API widget:  Modular Comm Info   <api_modularcomms.lua>
[f=0000000] Loaded API widget:  Chili Framework     <api_chili.lua>
[f=0000000] Loaded API widget:  Lups                <lups_wrapper.lua>
[f=0000000] Set UnitIconDist to 250
[f=0000000] Ground decals are enabled
[f=0000000] Advanced shading enabled
[f=0000000] Set maximum particles to: 20000
[f=0000000] Loaded widget:  EPIC Menu           <gui_epicmenu.lua>
but infologs doesn't tell me from which file you specify to load the framework before other widget. I tried to find api_chili.lua in any file but I failed. So please tell me how to say to spring to load the framework before widget
Post Reply

Return to “Lua Scripts”