Page 1 of 1

How to update my mod from version 81.x to 84.x

Posted: 22 Nov 2011, 13:12
by elias79
The commander unit is invisible, please help.
I remember doing this more then 1,5 years ago but i cant
remember how i did it.

Re: How to update my mod from version 81.x to 84.x

Posted: 22 Nov 2011, 17:54
by FLOZi
If you didn't try it in 0.82, most likely this is the issue (unit is not invisible - it isn't even there):

http://springrts.com/phpbb/viewtopic.ph ... ng#p414175

Re: How to update my mod from version 81.x to 84.x

Posted: 23 Nov 2011, 14:30
by elias79
Thank you, now i just need to figure out how to apply said solution.

Re: How to update my mod from version 81.x to 84.x

Posted: 27 Nov 2011, 08:22
by bobthedinosaur
I have also had issues recently porting some older mods to the newer version. I find that the health bar widget is giving me issues
[f=0000000] Error in Initialize(): [string "LuaUI\Widgets\unit_healthbars.lua"]:202: 'for' limit must be a number
no matter what health bar widget I use (or none at all).

And in some mods that have fbi and lua unit defs, all of the units with
fbi are not even being detected by spring? :? Am I missing something that requires fbi units to be loaded?

Re: How to update my mod from version 81.x to 84.x

Posted: 27 Nov 2011, 08:27
by zwzsg
Error on a 'for' limit? This sounds like you forgot to replace all your SomeTable.n by #SomeTable

Re: How to update my mod from version 81.x to 84.x

Posted: 27 Nov 2011, 08:31
by bobthedinosaur
yes there was an old widget laying in the spring/luaui/widget folder that was causing the issue. removing it stopped the mod's health bar from having any issues also. hopefully it was from a previous spring version?

but the fbi units being ignore is really strange, especially since games like s44 that use fbi's extensively seem to work just fine?

Re: How to update my mod from version 81.x to 84.x

Posted: 27 Nov 2011, 10:21
by FLOZi
Does the game have a custom unitdefs.lua or unitdefs_post.lua?

Re: How to update my mod from version 81.x to 84.x

Posted: 27 Nov 2011, 17:44
by bobthedinosaur
yes it does! Which I was suspecting might be causing this.. however I could find no issues with them.
They have an fbi loader:
http://pastebin.com/pFyMWwK3

Re: How to update my mod from version 81.x to 84.x

Posted: 27 Nov 2011, 20:08
by FLOZi
A profoundly broken one.

In fact it looks like:

1. That is based on a very old version of unitdefs.lua
2. The only 'custom' code in it is precisely why it is broken (line 67)

I suggest trying deleting it and relying on base content version.

Re: How to update my mod from version 81.x to 84.x

Posted: 27 Nov 2011, 22:40
by bobthedinosaur
issue resolved when it was replaced with a new version.

Re: How to update my mod from version 81.x to 84.x

Posted: 29 Nov 2011, 13:55
by hoijui
bob, why FLOZi suggested deleting it, instead of replacing it with a new version:
having unitdefs.lua in your mod only makes sense if you need special code in there, only used by your mod.
as this is not the case with you, it would be better if you would not have this file at all, which means you would automatically use a new version of the file, if the mod is used on a new engine version, and therefore you would see less problems and have less work/bug hunting to do in the future.

Re: How to update my mod from version 81.x to 84.x

Posted: 29 Nov 2011, 18:00
by FLOZi
I clarified with bob - he did delete it.