Question of Feasibility

Question of Feasibility

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Question of Feasibility

Post by SanadaUjiosan »

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.)
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Question of Feasibility

Post by FLOZi »

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'
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Question of Feasibility

Post by smoth »

it would be doable but not without major script-fu.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Question of Feasibility

Post by SanadaUjiosan »

Aw man, my script-fu is no good.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Question of Feasibility

Post by Das Bruce »

The only way to get good at something is to be constantly attempting things slightly outside your abilities.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Question of Feasibility

Post by SanadaUjiosan »

The suggested link shows pretty much exactly what I want. Figures it's not in lua.

I take it THIS was never developed further?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Question of Feasibility

Post by FLOZi »

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?
The animation scripts aren't in lua, but the bulk of the build system is in lua gadgets.

KingRaptor is working on a THIS_WIP11_beta.sd7, so there is still some work going on, even if not by kdr_11k.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Question of Feasibility

Post by SanadaUjiosan »

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.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Question of Feasibility

Post by SinbadEV »

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:
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...
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Question of Feasibility

Post by FLOZi »

zwzsg is a genius, but his scripts are surely best left away from newcomers. :P
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Question of Feasibility

Post by zwzsg »

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
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Question of Feasibility

Post by Google_Frog »

Try transporting factories with fireplatform.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Question of Feasibility

Post by Gota »

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.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Question of Feasibility

Post by Das Bruce »

My main concern for mobile factories is the behavior of the units it builds, what do they do?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Question of Feasibility

Post by zwzsg »

Das Bruce wrote:My main concern for mobile factories is the behavior of the units it builds, what do they do?
They get built, why? What did you expect?
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: Question of Feasibility

Post by JohannesH »

I guess he means how to apply waypoints
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Question of Feasibility

Post by KDR_11k »

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.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Question of Feasibility

Post by Google_Frog »

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.
User avatar
PTSnoop
Posts: 97
Joined: 09 Sep 2009, 19:05

Re: Question of Feasibility

Post by PTSnoop »

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.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Question of Feasibility

Post by zwzsg »

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.
Post Reply

Return to “Game Development”