Page 1 of 1

Mobile Mexes v3 final [updated]

Posted: 29 Jul 2007, 01:09
by jK
This luaRule allows mobile metal extractors
In particular, it assigns ANY* unittype an invisible metal extractor.

Image
luaRule + PressureLine's bmobmex(updated)
video

The script has a config file, so you can edit it easily to your needs.
So you can switch between 2 modes: always extract and a button handled extraction (the unit can't move then while extracting). Also it calls the COB events "MexDeploy"+"MexPackUp", so you can react on walk<->extraction changes.
If you want to use the new COB->lua interface, you need a working luaCOB folder and then you can call in your cob-script "lua_ChangeMexState(TRUE|FALSE)" and don't forget the fake luaCob function. For examples see PressureLine's bmobmex, which is included.
Of course, you can edit the extraction power and range.
(and yes the unit which the mexe is assigned to shows the metal extraction)

Note: To use the script you need a working luaRules folder (if you don't have one you should extract complete annihilation). Only if you want to use the COB->lua interface you need a working luaCob folder, too. And don't forget to change the default (hidden) metal extractor in the config file, if your mod don't have the armmex.

*except metal extractors itself! ->the choosen unittype which should be able to move must NOT extract metal itself. The metal extracts another hidden unit (normally an armmex) and copy the metal stats to the visible unit. btw you can change the extraction stats of the hidden mexe in the config file, so the hidden unit can be an armmex but have got the extraction strength of a moho mine.

changelog v2->v3:
*the hidden mexes are now gaiaTeam units. that fix the unitlimit problem and destroyed mobile mexes don't count as 2 units in the statistics anymore, also it cleans up your ressource bar alot (no +(double income) -(income) anymore ;))

changelog v1->v2:
*Because renames, it is recommend to delete the old gadget+config before you install the new version!
*fixed a problem with uppercases in unitnames
*add PressureLine's shiny bmobmex
*fixed wrong shown metal income
*renamed the cob interfaces
*add a cob->lua interface



Special tanks to: PressureLine for the idea + the pretty bmobmex <3

Posted: 29 Jul 2007, 01:12
by Pressure Line
oh man. i love you.

Posted: 29 Jul 2007, 01:13
by Peet
/me goes to mangle the MTR wiki page

Re: Moving Mexes LuaRule

Posted: 29 Jul 2007, 01:14
by Pressure Line
*edit* beaten by foxo

Posted: 29 Jul 2007, 01:14
by Foxomaniac

Re: Moving Mexes LuaRule

Posted: 29 Jul 2007, 01:17
by Pressure Line
jK wrote:In particular it allows metal extractors to move
This is very important. jK should get many lovings for this.

Posted: 29 Jul 2007, 08:16
by KDR_11k
What happens when you hit the unit limit?

Posted: 29 Jul 2007, 09:41
by Pressure Line
try killing the other player... that usually works for me

Posted: 04 Aug 2007, 11:05
by Pressure Line
i cannot seem to get this to work with my mobile mex unit, although oddly enough it works with EVERY other unit ive tried.

serious wtfage going on here

Posted: 04 Aug 2007, 20:12
by Noruas
I noticed this too, i think it has something to do with the length of the name of the unit. I dunno why it works sometimes and sometimes just ignores other units.

Posted: 04 Aug 2007, 23:38
by Pressure Line
Noruas wrote:I noticed this too, i think it has something to do with the length of the name of the unit. I dunno why it works sometimes and sometimes just ignores other units.
im not 100% sure whether it is the name length. since it worked fine with blightveh (9 chars), but not with bmobmex (7 chars)

Posted: 05 Aug 2007, 21:42
by jK
could you send me the corresponding mod or better say which mod (and unit) on uf has this problem, so i could fix it?

Posted: 06 Aug 2007, 01:11
by Pressure Line
jK wrote:could you send me the corresponding mod or better say which mod (and unit) on uf has this problem, so i could fix it?
easier if i just upload the unit and you add it into the UP 2.1A sd7, since theres a lot of random rubbish in my dev version

*edit* i'll also be giving it a try for BZS tonight, will let you know how it goes

Posted: 07 Aug 2007, 00:57
by Pressure Line
works fine with the scavenger from battlezone :/

i did notice a bit of a but, that being that when the mobile mex unit is selected, it only displays a fraction of the metal amount being extracted (the full amount as calculated from the resource bar is correct, but only ~1/3 is being displayed on the mobile portion of the unit), will post screens when i get home

Posted: 10 Aug 2007, 04:32
by jK
i fixed both of your problems: it works now on all units (it was a problem with uppercases in unitnames) and the M income is now correct.

Posted: 18 Aug 2007, 08:58
by jK
:idea: new version

Posted: 20 Aug 2007, 21:01
by Tired
Is it just me, or could E&E really use this? ~~

Posted: 21 Aug 2007, 01:26
by Pressure Line
probably. i also have code to stop hovering ones from extracting while over water ^_^

Posted: 21 Aug 2007, 08:54
by [XIII]Roxas
Think: Final Frontier Colony Ships.