Question of Feasibility
Moderator: Moderators
- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Question of Feasibility
I figured it's about time I see if an idea I have is even feasible. Basically an idea I'd like to implement in the mod I'm working on are moving factories.
To be more detailed, I'm planning on having these moving factories be large battleship type units that (very) slowly hover high in the air. Optimally, I'd like it so that when I click on this battleship, it has the build list like a factory, and then I select a unit to be built. The unit gets built "on" this battleship, on the deck more or less, and then when the unit is built, it sort of flies off and lands on the ground below.
My very puny understanding of how factories and all that works tells me that this idea very well could not work. It seems the unit needs to be defined as a factory to function as one, and, well, factories don't usually move.
So, if someone could tell me if this idea is feasible or not, that'd be great. If it is in fact feasible, if someone could give me some tips on getting it to actually work, that'd be great too. It's rather important to the core of my faction (3 of the 5 "factories" I have are planned to use this idea.)
To be more detailed, I'm planning on having these moving factories be large battleship type units that (very) slowly hover high in the air. Optimally, I'd like it so that when I click on this battleship, it has the build list like a factory, and then I select a unit to be built. The unit gets built "on" this battleship, on the deck more or less, and then when the unit is built, it sort of flies off and lands on the ground below.
My very puny understanding of how factories and all that works tells me that this idea very well could not work. It seems the unit needs to be defined as a factory to function as one, and, well, factories don't usually move.
So, if someone could tell me if this idea is feasible or not, that'd be great. If it is in fact feasible, if someone could give me some tips on getting it to actually work, that'd be great too. It's rather important to the core of my faction (3 of the 5 "factories" I have are planned to use this idea.)
Re: Question of Feasibility
It's feasible but you'd have to heavily lua it, rather than using engine code for factories. Try taking a look at the mod 'THIS'
Re: Question of Feasibility
it would be doable but not without major script-fu.
- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Re: Question of Feasibility
Aw man, my script-fu is no good.
Re: Question of Feasibility
The only way to get good at something is to be constantly attempting things slightly outside your abilities.
- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Re: Question of Feasibility
The suggested link shows pretty much exactly what I want. Figures it's not in lua.
I take it THIS was never developed further?
I take it THIS was never developed further?
Re: Question of Feasibility
The animation scripts aren't in lua, but the bulk of the build system is in lua gadgets.SanadaUjiosan wrote:The suggested link shows pretty much exactly what I want. Figures it's not in lua.
I take it THIS was never developed further?
KingRaptor is working on a THIS_WIP11_beta.sd7, so there is still some work going on, even if not by kdr_11k.
- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Re: Question of Feasibility
Oh I see... I have not even seen what's going on in the Lua Gadgets folder. Alright I'll look in there and see what's going on.
Re: Question of Feasibility
also zwzsg build some horrible hacky moving factories that might provide some inspiration... all the links to it are dead but here's the op: http://springrts.com/phpbb/viewtopic.php?t=2017
I was a genius:
I was a genius:
SinbadEV Sat Aug 27, 2005 12:33 pm wrote:I need to download the units to see it in action, but from what y'all seem to be saying, this crazy idea would be possible.
The one unit team: start with a simple bot (like a FARK in my brain) with about +20 metal and energy production, and 1000 of each storage, if it sits near metal it acts as an extractor, sits near a thermal vent as power collector. Then you could build a factory around the unit, the factory would have slots to grow solar cells, energy storage, extraction improvements, nuke plants, weapons, legs or wings or pontoons so it can become mobile again... and it would just get bigger and bigger, eventually growing factories that could produce swarming style units that would need to stay close to the base... problem is it would actually have to engage in direct combat with enemy bases so it would have to be sheilded from commander death-blasts...
Re: Question of Feasibility
zwzsg is a genius, but his scripts are surely best left away from newcomers. 

Re: Question of Feasibility
I've done mobile factories with cob, long before the taint of Lua reached Spring. I disagree about the genius bit: My moving factories script are much simpler and easier to understand than the average Lua gadget. I also disagree about the hacky adjective: Surely if I reach the same goal but with a simpler and more to-the-point code, it should be called elegant?
Here's a link to my mobile factories: http://springfiles.com/1687
Here's a link to my mobile factories: http://springfiles.com/1687
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Question of Feasibility
Try transporting factories with fireplatform.
Re: Question of Feasibility
Nice.
I did not know those existed.
I want a T3 unit that can attack and build units for ARM T3 instead of the Orcone.
I did not know those existed.
I want a T3 unit that can attack and build units for ARM T3 instead of the Orcone.
Re: Question of Feasibility
My main concern for mobile factories is the behavior of the units it builds, what do they do?
Re: Question of Feasibility
They get built, why? What did you expect?Das Bruce wrote:My main concern for mobile factories is the behavior of the units it builds, what do they do?
Re: Question of Feasibility
I guess he means how to apply waypoints
Re: Question of Feasibility
Zwzsg welded a factory to a mobile unit, the factory works the way a factory does, the mobile unit moves the factory with it when it moves. You don't get a single unit that performs both roles though.
Honestly I think the THIS behaviour is pretty damn close to what you want, just change the departure animation (currently it just movectrls the unit forward for a second or so) and you got your Gundam launching off the Whitebase.
Honestly I think the THIS behaviour is pretty damn close to what you want, just change the departure animation (currently it just movectrls the unit forward for a second or so) and you got your Gundam launching off the Whitebase.
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Question of Feasibility
If I were you I'd weld a factory to a unit. THIS factories are nowhere as good as Springs. They don't support multiple waypoints, cannot be alt-inserted and use a pay when you start production system. "Pay when you start construction" is a very annoying build system for games where you create many units and always want to be spending resources.
Re: Question of Feasibility
I can't get zwzsg's mobile factories to attach to their mobile units. The walking upgrade circles around the kbot factory with the cube stuck in the centre of the factory; the flying upgrade flies away without the factory. All factories stay put. (This is on version 0.80.5.2 on Ubuntu Karmic, if this makes any difference.)
If anyone figures out how to get this working in an easily-modifiable way, I'd really appreciate it. I had a bit of a look at the THIS lua but couldn't figure out how to get different factories to produce different units, or separate the teleporting-in code from the build-at-factory code.
If anyone figures out how to get this working in an easily-modifiable way, I'd really appreciate it. I had a bit of a look at the THIS lua but couldn't figure out how to get different factories to produce different units, or separate the teleporting-in code from the build-at-factory code.
Re: Question of Feasibility
Right, some spring update broke it again. I'll have to see about that.
Edit: I looked a bit, and first, I had to add a transportsize to my transport or else they won't load even normal units.
There's something that prevent attach-unit to work on building that was not there before (before the check was only on the UI command, not on the bos/cob command). I tried the obvious things like mass and transportmass with no success. I looked at UnitDefs of a peewee, a solar and veh plant, both in preload and ingame, to see what properties were differing, but saw nothing obviously related to transportation.
I looked a bit at the source and couldn't see anything explicitely disabling buildings in the CTransportUnit::CanTransport of \rts\Sim\Units\UnitTypes\TransportUnit.cpp
I mixed Peewees FBI tags with a solar FBI until I could load it. Had to add canmove and a MovementClass. I tried the same on vehicle plant and it wasn't enough. Then I removed the TEDClass=PLANT; and it could be loaded, but started to build units like a cons and not like a fac.
So, you could try harder than me to find which properties mark factories as unattachable. Or maybe it's hardcoded and you'll have to convince the dev it would be a good thing to let buildings and factories be attachable again.
Or just go for another way to have mobile factoies.
Edit: I looked a bit, and first, I had to add a transportsize to my transport or else they won't load even normal units.
There's something that prevent attach-unit to work on building that was not there before (before the check was only on the UI command, not on the bos/cob command). I tried the obvious things like mass and transportmass with no success. I looked at UnitDefs of a peewee, a solar and veh plant, both in preload and ingame, to see what properties were differing, but saw nothing obviously related to transportation.
I looked a bit at the source and couldn't see anything explicitely disabling buildings in the CTransportUnit::CanTransport of \rts\Sim\Units\UnitTypes\TransportUnit.cpp
I mixed Peewees FBI tags with a solar FBI until I could load it. Had to add canmove and a MovementClass. I tried the same on vehicle plant and it wasn't enough. Then I removed the TEDClass=PLANT; and it could be loaded, but started to build units like a cons and not like a fac.
So, you could try harder than me to find which properties mark factories as unattachable. Or maybe it's hardcoded and you'll have to convince the dev it would be a good thing to let buildings and factories be attachable again.
Or just go for another way to have mobile factoies.