Mobile Factories

Mobile Factories

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

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Mobile Factories

Post by Argh »

Ok, folks... I have solved most of the problem of delivering mobile factories. There are a few issues remaining, however, and I'd like some input.

Basically, all I need, for a mobile factory that is static when it can build stuff, is that button that says, "Fly/Land", and then to use a modified version of the Upgrade Script to change it into a flying or hovering Unit, then it can move. Ok, basic problem solved there- it can now move.

However, landing and becoming a Factory again is a bit more of a pain. Basically, it needs to land, facing a cardinal direction (i.e., exactly NSEW), and it needs to land in on a position where it satisfies Spring's requirements for Factories using Yardmaps, which means it must strictly adhere to map-squares, instead of being able to move in Elmos, or Spring Units, of linear measure.

So, basically when Land is hit, it needs to search for an appropriately-sized area on the ground, turn to one of the four cardinal directions, then land.

How can this be accomplished? I have a Factory that can take off and fly about done, so naturally, I'd love it if I could have this done before I release an Alpha.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Alternatively you could just reimplement the factory stuff in Lua so it's not actually a factory but it can create units, build on them for a while and then release them?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

That's a good idea. Maybe a lot more workable, honestly.

Although I'd kind've like a Yardmap- that's the only prickly bit. I'm using a U-shaped Land Factory (clever name, eh?) in PURE, and it uses rocket motors to move... it'd be kind've lame, if Units could just walk through the walls. If anybody has any ideas about that issue, I'm all ears.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

SupCom's mobile factory pushes the unit out once it's completed.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

For mobile factories that aren't aircraft perhaps lua can intercept the build order, cancel it, and issue a build order next to the mobile factory and then snatch the half built unit up using transport cob code, releasing it once it has finished building.
User avatar
Zpock
Posts: 1218
Joined: 16 Sep 2004, 23:20

Post by Zpock »

KDR_11k wrote:Alternatively you could just reimplement the factory stuff in Lua so it's not actually a factory but it can create units, build on them for a while and then release them?
I have thought of this as well, combine it with making a LUA driven custom economy, and then one can finally get rid of the TA building system and implement whatever one wants. Starcraft/warcraft like ui with the limited buildqueues, CnC style with the sidebar, or even something new.

Landing pads, better control of building animations, barracks that don't nanolathe infantry... lots of nice things.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Not untill AI support for lua is added otherwise your nuking all chances of AI support for your mod untill someone actually does an AI interface for lua.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

Bah, all AI (save yours, AF), already completly fail on any mod that doesn't completly adhere to the TA buildtree. I'm not even talking about very special mods such as Spring Racer, even something pretty standard like E&E can get an AI hopelessly lost.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

RAI and KAI would actually do fine with simbæs, with some slight econ tweaks.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Thats because simbase has nothing OTA doesnt except that nanotower, and thats not a requirement either.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Besides, all Spring TA variants have nanotowers so there's been plenty of time for AI devs to realize the concept needs to be supported.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

AI and EE? did you not see the KAI of old? even the current version of KAI 0.12? that AI plays EE better than it ever played TA
Post Reply

Return to “Lua Scripts”