Please help me update chili
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Please help me update chili
Oh god, if only it were that simple. Sadly it isn't.
The problem starts with the fact that jk only updates the framework, none of the widgets for it, so getting clean copies of the widgets is impossible. The only way to get copies of the widgets is to take them from zk and try to fix all the errors.
This all started because CarRepairer has declined to update easymetal with area mex functionality. As a result, evo has to index all the mex spots twice with 2 separate algorithms in order to have full functionality.
THe problem is the fact that I want to be able to use lua mex spots. That's all fine and good and easymetal detects them, but my area mex gadget doesn't, so while it works, area mex doesn't and I'm not willing to just shitcan that functionality.
Therefore my only option is the switch to the method that ZK uses for mex spots (which I hate with an undying passion). Ok, cool. The problem with that is that in order to use it, I have to update chilli and all associated widgets, meaning that since much of my customizations aren't in configs (because for whatever reasons non of the widgets have configs for placement, sizing and so on), I will lose all of them.
Fine I think to myself, I'll deal with it and once it is all functional, I will go and fix them.
NOT SO FAST.
In gutting chilli from evo and supplanting with the latest from github and the latest widgets from zk, I have a bunch of errors.
Ok, no big deal, I expected that.
3 hours later, fixing one error leads to 5 more and so on and so forth. I have gotten to the point to where I can't fix them anymore because I have no idea wtf it's talking about.
I have created a branch of evo specifically for this purpose. Could someone with chilli knowledge please go in and take a look and if they feel especially nice, fix the issues?
The checkout url is: http://evolutionrts.googlecode.com/svn/ ... chilli.sdd
To anyone who helps, thank you. This has been an extremely frustrating experience.
The problem starts with the fact that jk only updates the framework, none of the widgets for it, so getting clean copies of the widgets is impossible. The only way to get copies of the widgets is to take them from zk and try to fix all the errors.
This all started because CarRepairer has declined to update easymetal with area mex functionality. As a result, evo has to index all the mex spots twice with 2 separate algorithms in order to have full functionality.
THe problem is the fact that I want to be able to use lua mex spots. That's all fine and good and easymetal detects them, but my area mex gadget doesn't, so while it works, area mex doesn't and I'm not willing to just shitcan that functionality.
Therefore my only option is the switch to the method that ZK uses for mex spots (which I hate with an undying passion). Ok, cool. The problem with that is that in order to use it, I have to update chilli and all associated widgets, meaning that since much of my customizations aren't in configs (because for whatever reasons non of the widgets have configs for placement, sizing and so on), I will lose all of them.
Fine I think to myself, I'll deal with it and once it is all functional, I will go and fix them.
NOT SO FAST.
In gutting chilli from evo and supplanting with the latest from github and the latest widgets from zk, I have a bunch of errors.
Ok, no big deal, I expected that.
3 hours later, fixing one error leads to 5 more and so on and so forth. I have gotten to the point to where I can't fix them anymore because I have no idea wtf it's talking about.
I have created a branch of evo specifically for this purpose. Could someone with chilli knowledge please go in and take a look and if they feel especially nice, fix the issues?
The checkout url is: http://evolutionrts.googlecode.com/svn/ ... chilli.sdd
To anyone who helps, thank you. This has been an extremely frustrating experience.
Last edited by Forboding Angel on 12 May 2013, 14:03, edited 2 times in total.
Re: Please help me update chilli
what state is this in?
is it before updating chili, after updating it or even after your custom changes?
is it before updating chili, after updating it or even after your custom changes?
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Please help me update chilli
My custom changes are what is in evo now. The thing is, what is in evo now is a rather old version of chilli. This wouldn't be an issue except that for some interesting reason, the mex crap interfaces with the chilli widgets, specifically the minimap. In order to update the minimap, everything else must be updated as well.
It was much easier to just rip chilli out of evo and grab the latest from github and the latest widgets from zk. Too much has changed for a simple updating.
This is why I branched evo for this purpose, because one thing leads to another that leads to another, but at this point I need help as I can't do it on my own.
It was much easier to just rip chilli out of evo and grab the latest from github and the latest widgets from zk. Too much has changed for a simple updating.
This is why I branched evo for this purpose, because one thing leads to another that leads to another, but at this point I need help as I can't do it on my own.
- Funkencool
- Posts: 542
- Joined: 02 Dec 2011, 22:31
Re: Please help me update chilli
It might just be worth just taking the chili framework from zk as well. They use a modified framework, and that might be part of the reason you're having problems.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Please help me update chilli
Already did. Figured that out at some point along the way. :-/
- Funkencool
- Posts: 542
- Joined: 02 Dec 2011, 22:31
Re: Please help me update chilli
Still problems? I can't look right now but if no one else looks at it for you, I can later.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Please help me update chilli
Yeah, it's all jacked up. I fixed the bugs up to the point where I have no idea what it is talking about.
Ignore the survival spawner error. Due to the way chickens was originally coded (survival is a derivative), it won't fail gracefully if not in use (doesn't cause an issue, other than being slightly irritating).
Ignore the survival spawner error. Due to the way chickens was originally coded (survival is a derivative), it won't fail gracefully if not in use (doesn't cause an issue, other than being slightly irritating).
Re: Please help me update chilli
unitdef error in mex_spot_finder.lua is because there is atari in your mod:
local mexUnitDef = UnitDefNames["cormex"]
local mexUnitDef = UnitDefNames["emetalextractor"]
line 260 copy[key] = CopyTable(value, true) --was Spring.Utilities.CopyTable(value, true)
also fixes it
After that there is a bit of Lua on the screen.
It still fails at (and probally more places)
Is the metalspot/areamex/stuff like http://springrts.com/phpbb/viewtopic.php?f=23&t=30171 the only problem?
Then imo just fix those instead of trying to make zk stuff work in your mod.
Btw for anyone who wants to look at it:
you can type /quit to exit since it breaks esc menu etc
local mexUnitDef = UnitDefNames["cormex"]

I guess it needs some lib file but[f=0000000] Error: Lua LoadCode pcall error = 0, luaui.lua, error = 2, LuaUI/cawidgets.lua, [string "LuaUI/Widgets/gui_epicmenu.lua"]:260: attempt to index field 'Utilities' (a nil value)
line 260 copy[key] = CopyTable(value, true) --was Spring.Utilities.CopyTable(value, true)
also fixes it
find the file that provides this LOG thing or just comment all the lines out. Nobody reads these logs anyway![f=0000000] Failed to GetConfigData from: EPIC Menu ([string "LuaUI/Widgets/gui_epicmenu.lua"]:426: attempt to index global 'LOG' (a nil value))
After that there is a bit of Lua on the screen.
It still fails at (and probally more places)
dont know what crude is[f=0000000] Error in Update(): [string "LuaUI/Widgets/gui_chili_integral_menu.lua"]:1171: attempt to index field 'crude' (a nil value)
Now you too realize, making mod by copypasting random files from everywhere does not work.fixing one error leads to 5 more and so on and so forth
Is the metalspot/areamex/stuff like http://springrts.com/phpbb/viewtopic.php?f=23&t=30171 the only problem?
Then imo just fix those instead of trying to make zk stuff work in your mod.
Btw for anyone who wants to look at it:
you can type /quit to exit since it breaks esc menu etc
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Please help me update chilli
Yeah because that's TOTALLY what I did. Get over yourself.knorke wrote:Now you too realize, making mod by copypasting random files from everywhere does not work.
Edit: While you are a total jerk for that comment and the insinuation, at least you're a helpful total jerk, so thanks for that.
Just because your name is green on this forum doesn't give you free license to be a dickhead.
Re: Please help me update chilli
Yes and it caused problems in the past, the mentioned thread where copypasting one incompatible wupget broke another is not that old so maybe it is not so good idea.Forboding Angel wrote:Yeah because that's TOTALLY what I did.
You wrote:
How can you know that mixing stuff like this will work, taking chili from github and widgets from zk = copypasting random stuff. Funkencool already suggested that it might not work together.In gutting chilli from evo and supplanting with the latest from github and the latest widgets from zk, I have a bunch of errors.
Some chili files in zk seem to be different, no idea what, but they have different amount of lines.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Please help me update chilli
How nice of you to read the thread. You might also read the part where I took the chili core from zk instead of using master from github, for exactly the same reasons that you mention. Gee imagine that. Sometimes when we read a thread we can discuss and not sound like a jerk at the same time, and realize that what we are spouting off about is completely irrelevant! *gasped*
Re: Please help me update chilli
i thought the svn still had chili files from github since there was only one commit regarding them. https://code.google.com/p/evolutionrts/ ... tail?r=563
would have expected that there is another commit, this time with files from zk. but there was none, so assumed using zk files was not commited yet or local test or something.
these things are easily avoided by putting commit messages.
would have expected that there is another commit, this time with files from zk. but there was none, so assumed using zk files was not commited yet or local test or something.
these things are easily avoided by putting commit messages.
- Funkencool
- Posts: 542
- Joined: 02 Dec 2011, 22:31
Re: Please help me update chilli
alright first you're simply missing..
/zk/LuaUI/Widgets/api_shared_functions.lua
it has some global functions epic menu needs and basically most zk's widgets need global option functions in epic/crude menu(same widget), so it was just the domino effect.
Secondly
integral is having a problem with one of your custom commands. I say this because commenting out the line that creates buttons for custom commands fixes this (line 885 in integral_menu widget).
If you get that first file and comment out that line of code chili will work. I still don't know what's causing custom commands to give nil but for now you can at least have working chili widgets.
/zk/LuaUI/Widgets/api_shared_functions.lua
it has some global functions epic menu needs and basically most zk's widgets need global option functions in epic/crude menu(same widget), so it was just the domino effect.
Secondly
Code: Select all
for i = 1, #commands do ProcessCommand(commands[i]) end
--for i = 1, #customCommands do ProcessCommand(customCommands[i]) end
for i = 1, #globalCommands do ProcessCommand(globalCommands[i]) end
If you get that first file and comment out that line of code chili will work. I still don't know what's causing custom commands to give nil but for now you can at least have working chili widgets.
Re: Please help me update chilli
the error was something about "id is nil" so I thought it is maybe a custom command that has no/invalid id.Funkencool wrote:I still don't know what's causing custom commands to give nil but for now you can at least have working chili widgets.
To find which one I added in gui_chili_integral_menu.lua
Code: Select all
local function ProcessCommand(cmd)
Spring.Echo ("here comes the next cmd")
for key,value in pairs(cmd) do Spring.Echo("cmddebug", key,value) end

[f=0000017] here comes the next cmd
[f=0000017] cmddebug, type, 0
[f=0000017] cmddebug, action, evocommemp
[f=0000017] cmddebug, tooltip, Activate Overseer EMP Defense
[f=0000017] cmddebug, cursor, Attack
[f=0000017] cmddebug, name, EMP
[f=0000017] cmddebug, pos, <table>
[f=0000017] cmddebug, texture, LuaUI/Images/commands/emp.png
[f=0000017] cmddebug, params, <table>
[f=0000017] Error: LuaUI::RunCallIn: error = 2, LayoutButtons, [string "LuaUI/Widgets/gui_chili_integral_menu.lua"]:585: attempt to perform arithmetic on field 'id' (a nil value)
So was this one.
In LuaRules/Configs/customcmds.h.lua add
CMD_SHOOTNOW = 6668 (or some other number not already in that file)
---
gui_highlight_geos.lua has
local geoDefID = UnitDefNames["geo"].id
must be existing unitname of geopowerplant (when this unit is selected for building it activates geo highlight mode)
/edit
[f=0000000] [gadgets.lua] Error: Failed to load: api_subdir_gadgets.lua ([string "LuaRules/Gadgets/api_subdir_gadgets.lua"]:36: attempt to index local 'g' (a nil value))
dont know how to fix that but the line is just for printing something:
local name = g.ghInfo.name
print(string.format("Loaded gadget: %-18s <%s>", name, gf))
The gh:InsertGadget(g) where it actually does something is above that and does not seem to have problem with it, hm.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Please help me update chilli
Knorke, wrt commit messages... I'm quite under the weather and I was annoyed and didn't think I would come running here with my tail between my legs, so you have a valid point there, that said, I was pretty clear about what I had done and in what order. I appreciate your help. it would be nice if it wasn't also accompanied with a kick to the balls.
@funkencool, thank you so much.
Wrt to geo highlight.. I actually have one in evo with the correct unitdef, but I wasn't sure if so might have modified it to play nice with the mex view, so I copy pastas. hadn't changed the unitdef inside though, of course.
@funkencool, thank you so much.
Wrt to geo highlight.. I actually have one in evo with the correct unitdef, but I wasn't sure if so might have modified it to play nice with the mex view, so I copy pastas. hadn't changed the unitdef inside though, of course.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Please help me update chilli
Ok, chili is working now! Wheee 
Still some issues though.
First issue:
How do I remove the overdrive stuff from the resource bars?

Still some issues though.
First issue:
How do I remove the overdrive stuff from the resource bars?