research buttons

research buttons

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

Post Reply
User avatar
Razorblade
Posts: 47
Joined: 11 Jul 2009, 14:51

research buttons

Post by Razorblade »

Is there a way to get research buttons (like in Empire Earth) on a building ?

And how to get it done ?

can anybody help with that

Thx
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: research buttons

Post by zwzsg »

Since the Lua language was introduced a couple years ago, a slow but profound shift is occuring into the Spring RTS environnement:

- Before, modders made feature requests, and engine devs coded it in C++ into the Spring engine source itself. Or rather, on a whim engine devs added cool new feature into the engine source that modders could then use.

- Nowadays, no new features are added into the engine. Instead, modders are told to grow programming abilities and code their own new features themselves, via Lua scripts.

- The modders who cannot code often resort to stealing code from other mods that have features they'd like, only to find out they still need coding skills to understand what files to pull, how to use them, how to adapt them to their own need.

So, the answers you are going to get are either:
- Scorns for you inability to code such a simple Lua gadget.
- Scorns for you ignorance that mod X already has such a Lua gadget.

Good luck, have fun, and please enjoy your stay.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: research buttons

Post by FLOZi »

As an aside, how many commercial engines can you mod / make a game on without any programming skills? :wink:
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: research buttons

Post by Master-Athmos »

Yes, you have to do code the logics for research by yourself via Lua. I suggest you have a look at the morphing gadget in e.g. Complete Annihilation and the research that is integrated in Gundam RTS in order to give you a start...
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: research buttons

Post by Pxtl »

z, I don't think he would get any scorn even without your preemptive interjection... maybe less help, but no scorn. He seemed polite.

Anyways, Gundam includes a research button for unlocking units... however Gundam's research button is global, and the UI is very custom, so it probably won't be in a reusable form.

Alternately, some guy ;) made a nice set of reusable research buildings, such that each building would unlock units. Not quite the "click a button to do reserach" but it's similar and works well within the Spring engine.

Either way, it's absolutely doable. I just don't know how.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: research buttons

Post by bobthedinosaur »

who is this some guy pxl?
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: research buttons

Post by Pxtl »

bobthedinosaur wrote:who is this some guy pxl?
zwzsg.

sorry, it wasn't buildings, just the lua to do it. But yeah, z made a lua-research-system. Odd he didn't bring it up in his initial reply. But either way, his system was about "construct buildng X to unlock unit Y".
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: research buttons

Post by zwzsg »

There: Tech Requirements

Like Pxtl said, it's not really research buttons, but a set of gadgets to make buildings unlock buttons. Gameplaywise, it's the same functionnality as a research button, except that instead of building an abstract, intangible "research", the "research" has to be materialised into a unit (such as a building called "tech center"). Losing that unit may or may not make you lose the tech, depending which version of my gadgets you pick. Meh, I'm using more words and this only make it more confusing:
Pxtl wrote:"construct buildng X to unlock unit Y".
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: research buttons

Post by SanadaUjiosan »

Pxtl wrote:
bobthedinosaur wrote:who is this some guy pxl?
zwzsg.

sorry, it wasn't buildings, just the lua to do it. But yeah, z made a lua-research-system. Odd he didn't bring it up in his initial reply. But either way, his system was about "construct buildng X to unlock unit Y".
Sounds like the Starcraft system.
User avatar
Razorblade
Posts: 47
Joined: 11 Jul 2009, 14:51

Re: research buttons

Post by Razorblade »

Ok.

I used for now the tech gadget from Zwzsg.
Can i set in the .FBI a value to make the AI build a building first ?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: research buttons

Post by KDR_11k »

The Gundam system actually supports unit researches too (well, triggered by units, they still apply globally), it was implemented that way before Smoth had me revise it to be global. The bigger limitation is that it's designed for the Gundam resource system (which can also be adapted for other resource setups) but I believe there's some minor *A spinoff that uses a TA resource version of the research code.
Post Reply

Return to “Game Development”