Ok - now this is weird:
I did a total copy from BA 6.0 i.e. model, cob-script and FBI and it works. Then I went ahead and edited the costs and buildtime values and it now doesn't work anymore. I didn't change any command or erase a semicolon - I just put different values in there...
Yeah as I said in the above post I didn't touch anything besides the values and also didn't erase any semicolon (not the first FBI I edit btw ). I think I'll now go ahead and try to just change one value after the other - maybe I can pin down which change causes the error although I still don't know why it keeps saying the error is in line 1...
If everything else fails, upload the entire fbi somewhere so we can have a look at it. The problem must be some semicolon placed (or not placed) somewhere in it or something of that nature.
Ok - it gets even more funny:
Go ahead and get Balanced Annihilation if you don't have it yet. Extract it and change the metal costs of the corspec into let's say 35. Save, pack it again and try to build or cheat it - it won't work...
Interestingly putting the value back didn't help either...
EDIT:
Well I've now taken the Spectre FBI from CA and reworked it to be a jammer again. Works fine - no idea what's so bad about the BA FBI...
Quick modding questions:
-No COB<->LUA as of 0.76?
-What's the easiest way to have a self manipulating unit file, and how soon would the effects show up in game?
-Can cob or lua access the in game timer? Or I suppose I could just start a timer in the LUA script.
-What mods can I use as a base to start on without having to worry about permissions?
If none, I suppose I can go back to twiddling my thumbs and playing Dwarf Fortress while I wait for the next version.
@Evil4Zerggin
In options, it has a default setting to define to, switch that to TAK, or just #define TAK (but I'm not sure if that is the exact spelling it wants).
@El Idiot
1. LuaCob does exist in 0.76.
2. Self-manipulating unit file? Could you explain what you mean a bit more?
3. LuaRules can't really have any timers in it. But once every game frame the engine calls the Update function for every widget and gadget that has one, passing it which frame number it is on. You can use this to time stuff. There are 33 game frames per game second, iirc.
4. If you are just experimenting, anyones mod will do. If you are going to release something, just ask the mod owners/creators first.
I have another question, this time about fixedlauncher. What I want is a missile that flies straight forward from its launcher until its weapontimer expires, then begins to track its target. Here's what I have:
What happens is that the missiles don't move at all until the weapontimer expires, and then they fly toward their target. If I don't put in fixedlauncher=1, the missiles seem to execute the desired behavior, except of course that they fire straight upwards at first instead of the direction that the weapon is pointing.
I have it cycling through the 8 fire points on the Core Manticore, which are called rmiss_fire, lmiss_fire, and fireX, for X from 1 to 6. [code]
#define TA // This is a TA script
Killed(severity, corpsetype)
{
if( severity <= 25 )
{
corpsetype = 1;
explode ground type BITMAPONLY | BITMAP1;
explode pelvis type BITMAPONLY | BITMAP2;
explode lleg type BITMAPONLY | BITMAP3;
explode rleg type BITMAPONLY | BITMAP4;
explode turret type BITMAPONLY | BITMAP5;
explode gunbase type BITMAPONLY | BITMAP1;
explode rmiss type BITMAPONLY | BITMAP2;
explode lmiss type BITMAPONLY | BITMAP3;
explode flak type BITMAPONLY | BITMAP4;
return (0);
}
if( severity <= 50 )
{
corpsetype = 2;
explode ground type FALL | BITMAP1;
explode pelvis type FALL | BITMAP2;
explode lleg type FALL | BITMAP3;
explode rleg type FALL | BITMAP4;
explode turret type FALL | BITMAP5;
explode gunbase type BITMAPONLY | BITMAP1;
explode lmiss type FALL | BITMAP2;
explode rmiss type BITMAPONLY | BITMAP3;
explode flak type FALL | BITMAP4;
return (0);
}
if( severity <= 99 )
{
corpsetype = 3;
explode ground type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
explode pelvis type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
explode lleg type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
explode rleg type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
explode turret type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5;
explode gunbase type BITMAPONLY | BITMAP1;
explode rmiss type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
explode lmiss type BITMAPONLY | BITMAP3;
explode flak type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
return (0);
}
corpsetype = 3;
explode ground type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
explode pelvis type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
explode lleg type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
explode rleg type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
explode turret type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5;
explode gunbase type SHATTER | EXPLODE_ON_HIT | BITMAP1;
explode rmiss type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
explode lmiss type BITMAPONLY | BITMAP3;
explode flak type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
}
[/code]
El Idiot wrote:A reference to an external variable, which it would then recalculate some unit stats based off that.
I think I'm getting some idea of what you want.
LuaRules and LuaCob can access and alter any field of a unit's unitdef (the fbi after loading). I think the results might be fairly instant from what I've heard, but haven't actually tried it yet. At latest they would affect units created after the change.
All 4 lua sections (Rules, Cob, UI, and Gaia) are capable of loading data from external files, though I'm not sure of the particulars of that either.
I also think the new mod options are linked into lua somehow (just because everything else is), but I didn't even catch the discussion for those to be sure.