Page 1 of 1

research buttons

Posted: 06 Apr 2010, 14:32
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

Re: research buttons

Posted: 06 Apr 2010, 14:53
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.

Re: research buttons

Posted: 06 Apr 2010, 15:06
by FLOZi
As an aside, how many commercial engines can you mod / make a game on without any programming skills? :wink:

Re: research buttons

Posted: 06 Apr 2010, 15:46
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...

Re: research buttons

Posted: 06 Apr 2010, 15:52
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.

Re: research buttons

Posted: 06 Apr 2010, 20:40
by bobthedinosaur
who is this some guy pxl?

Re: research buttons

Posted: 06 Apr 2010, 21:11
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".

Re: research buttons

Posted: 06 Apr 2010, 23:32
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".

Re: research buttons

Posted: 07 Apr 2010, 02:37
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.

Re: research buttons

Posted: 08 Apr 2010, 11:13
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 ?

Re: research buttons

Posted: 08 Apr 2010, 15:11
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.