Noob here, with questions

Noob here, with questions

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

TassadarZeratul
Posts: 17
Joined: 26 Nov 2009, 14:26

Noob here, with questions

Post by TassadarZeratul »

Hi there. Thanks for taking the time to help me out.

I am very new to this engine, but have modded other games before. For the most part, I stick to an RTS game called StarCraft. In StarCraft modding, there is a technique called "plugins", where you inject custom C++ code into the game. As an example, I once made it so that all units belonging to a particular faction have five shield points, which regenerate over time, and that a unit with a full five shields will rapidly regenerate health. (In practical terms, this means that a unit that takes no hits for about three seconds will be healed very quickly.) Is something like this possible with the Spring engine?
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Noob here, with questions

Post by Neddie »

Well, Spring is prepared to support a wide variety of games, rather than the Starcraft engine which was designed to support... well, Starcraft. You can create mechanics like that, though it is unlikely you'll need to go down into the engine itself. You can do more accessible scripting game/content side.

For example, Gundam RTS has four resources, all of them implemented without touching the engine code. Spring: 1944 has locational armour, fear/suppression, prisoners of war and limited ammunition weapons.

Also, just to get this out of the way, what we refer to as "mods" are actually modules, rather than modifications. Most of the "mods" are full games or ported games/modifications from other engines.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Noob here, with questions

Post by Google_Frog »

With any request there is a very good chance that you will be able to write a gadget to create the desired behaviour.

In this case the functionality is built right into the engine. In unit defs "idleAutoHeal" is how many hp per second a unit will heal "idleTime" is how long the unit must not have been damaged for for it to heal. (actually the units may be hp/frame and frames, I don't know so you would need to test).
TassadarZeratul
Posts: 17
Joined: 26 Nov 2009, 14:26

Re: Noob here, with questions

Post by TassadarZeratul »

Woah, fast reply. ^________^

Anyone have a guide to creating these "gadgets"? (I'll check the wiki ofc.)

Thanks, guys. <3
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Noob here, with questions

Post by Google_Frog »

Woah, fast reply.
Around here people jump at the chance to tell people that games are really "games" not "mods".

This page http://springrts.com/wiki/Lua_Beginners_FAQ has most lua functions under game dynamics and local dynamics. My method for learning what each function does is to a batch-find on CA's gadgets or widgets folder, chances are the function or call-in will be used somewhere. There's some general tutorials stickied in the lua subforum.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Noob here, with questions

Post by smoth »

Google_Frog wrote:
Woah, fast reply.
Around here people jump at the chance to tell people that games are really "games" not "mods".
it is an important distinction. I have explained this several times.


@OP: also all projects can be opened with 7zip and thier source code read. Both ca and s44 are goldmines of lua knowledge. Search in this suboforum for kdr_11k and Zwzsg, both of which write some pretty boss stuff.
TassadarZeratul
Posts: 17
Joined: 26 Nov 2009, 14:26

Re: Noob here, with questions

Post by TassadarZeratul »

Thanks for all the help, but I'm not finding it that helpful. I have a learning disability that makes it nearly impossible for me to learn from tutorials like the one linked to here. However, I can easily extrapolate from examples, meaning if someone gives me a few examples of how to do things, I can usually figure out the rest. So, I'm going to ask three questions. If someone answers them, then there is about a 95% chance that I can figure out everything I need to know. (My brain is just weird like that. >.> )

1) Is it possible to create a structure like the Zerg Nydus Canal in StarCraft? A Nydus Canal can spawn another Nydus Canal at any point on the map near a Zerg Hatchery, Lair, Hive, Creep Colony, Sunken Colony, or Spore Colony, then teleport units to and from itself to the Nydus Canal it spawned. If a Nydus Canal dies, so doesthe linked one.

2) In StarCraft, the Terran Ghost can call Nuclear Strikes. Doing so requires you to have built a Nuclear Missile at the Nuclear Silo, and expends the missile (obviously).

3) How would one make a structure modify the terrain when it is built, or require a certain special type of terrain to be built upon?
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Noob here, with questions

Post by Pxtl »

Everybody here is intimately familiar with StarCraft. You don't need to elaborate on SC references.

All of that stuff is doable. Instead of C++, in Spring you use Lua code to do things that are outside of basic tweaking-unit-stats and weaponry. With Lua, you could have a building build another building (once and only once) to do the Nidus target-spawn, and then use Lua to teleport nearby-units. Many mods have hand-made teleporting systems (for example, Kernel Panic has a faction where units sent to a teleporter exist outside of the map in a buffer, and be spawned from any teleporter on the map)

The nuke-strike would also be doable, although I've never seen anybody implement it - a weapon that is only fired at the target of another unit. Closest I've seen is Kernel Panic, where the System's nuke-launcher sends a special self-destructing unit instead of a projectile to the target.

And modifying terrain has been done a great deal in Complete Annihilation.
TassadarZeratul
Posts: 17
Joined: 26 Nov 2009, 14:26

Re: Noob here, with questions

Post by TassadarZeratul »

So I should just look at Kernal Panic and Compete Annihilation's Lua scripts? That works, thanks.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Noob here, with questions

Post by smoth »

TassadarZeratul wrote:Thanks for all the help, but I'm not finding it that helpful. I have a learning disability that makes it nearly impossible for me to learn from tutorials like the one linked to here.
. . . . this almost sounds like an excuse.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Noob here, with questions

Post by FLOZi »

TassadarZeratul wrote:So I should just look at Kernal Panic and Compete Annihilation's Lua scripts? That works, thanks.
They (especially CA) have a lot of lua, looking through them and determining what code is doing what is similar to what you want is not a trivial undertaking.
TassadarZeratul
Posts: 17
Joined: 26 Nov 2009, 14:26

Re: Noob here, with questions

Post by TassadarZeratul »

@smoth: But it's true. >.>

@above: Uhm, so what should I do now? It would really help if I had some code snippets. All I really need to know is how to create custom commands, like the "place nydus canal exit" one I mentioned above.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Noob here, with questions

Post by smoth »

TassadarZeratul wrote:@smoth: But it's true. >.>
I was born with a still yet unknown nervous disorder that causes frequent and sometimes disabling hand tremors... yet I can model and do art and illustration. It is an excuse, don't use it as a crutch move beyond it.
TassadarZeratul wrote:@above: Uhm, so what should I do now?
Read code ask questions.
TassadarZeratul wrote: It would really help if I had some code snippets.
What? like all the projects who's source you can read?
TassadarZeratul wrote: All I really need to know is how to create custom commands, like the "place nydus canal exit" one I mentioned above.
ok but you are trying to run track before you can even crawl.
TassadarZeratul
Posts: 17
Joined: 26 Nov 2009, 14:26

Re: Noob here, with questions

Post by TassadarZeratul »

smoth wrote:
TassadarZeratul wrote:@smoth: But it's true. >.>
I was born with a still yet unknown nervous disorder that causes frequent and sometimes disabling hand tremors... yet I can model and do art and illustration. It is an excuse, don't use it as a crutch move beyond it.
I've learned several programming languages. I don't use my learning disability as an excuse. All I'm saying is it's harder for me to learn, so I'm asking the sort of questions that make it easier for me.
smoth wrote:
TassadarZeratul wrote:@above: Uhm, so what should I do now?
Read code ask questions.
I'm asking for example code so I can do that. As Flozi pointed out, it wouldn't be easy to analyze code when I don't even know what the intended purpose of the code I'm looking at is. Hence, I'm asking for very specific code so I'd know what it does, and trying to ask for examples that wouldn't take much time to write. (If the examples that I'm asking for would, in fact, take a long time to write, feel free to tell me so and I'll ask for a different example.)
smoth wrote:
TassadarZeratul wrote: It would really help if I had some code snippets.
What? like all the projects who's source you can read?
The projects Flozi just said have a huge amount of Lua scripting so they're really hard to analyze, especially for a noob like me? >.>
smoth wrote:
TassadarZeratul wrote: All I really need to know is how to create custom commands, like the "place nydus canal exit" one I mentioned above.
ok but you are trying to run track before you can even crawl.
Explain. I would assume something this commonly done would be easy. Also, I am fluent in C++, and Lua seems pretty similar.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Noob here, with questions

Post by Pxtl »

The problem is that Spring was originally made for a TA-like game and very little else. Obviously it has developed a great deal since then, but the process has created a lot of warts. Some of the simple things are complicated, and some of the complicated things are simple.

Consider that, being TA-like, a certain form of GUI and placement behavior for placing units exists by default. Wanting to override that means ignoring what the engine gets you cheaply, and working from scratch.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Noob here, with questions

Post by smoth »

TassadarZeratul wrote:I've learned several programming languages. I don't use my learning disability as an excuse. All I'm saying is it's harder for me to learn, so I'm asking the sort of questions that make it easier for me.
It is harder for me to USE MY HANDS sometimes I cannot do anything for 5 minutes, I randomly drop stuff because my hands forget to hold things. I don't want to hear you bitching about learning disorder when I have a primary interface issue with the planet. In case that was in any way unclear it is hard for me to even hold a pencil sometimes yet I draw.
TassadarZeratul wrote:I'm asking for example code so I can do that.
Read code ask questions.
TassadarZeratul wrote:as Flozi pointed out, it wouldn't be easy to analyze code when I don't even know what the intended purpose of the code I'm looking at is.
Read code ask questions. also most lua files do have a meaningful name. Also if you need to know about certain behaviors or whatever ask if there is something that does it or something similar to it.
TassadarZeratul wrote:Hence, I'm asking for very specific code so I'd know what it does, and trying to ask for examples that wouldn't take much time to write.
you were given answers to that question GET CRACKING
TassadarZeratul wrote:The projects Flozi just said have a huge amount of Lua scripting so they're really hard to analyze, especially for a noob like me? >.>
"read the code and ask questions"
TassadarZeratul wrote:Explain. I would assume something this commonly done would be easy. Also, I am fluent in C++, and Lua seems pretty similar.
if you were fluent in c++ you would not say that.
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: Noob here, with questions

Post by JohannesH »

smoth wrote:
TassadarZeratul wrote:I've learned several programming languages. I don't use my learning disability as an excuse. All I'm saying is it's harder for me to learn, so I'm asking the sort of questions that make it easier for me.
It is harder for me to USE MY HANDS sometimes I cannot do anything for 5 minutes, I randomly drop stuff because my hands forget to hold things. I don't want to hear you bitching about learning disorder when I have a primary interface issue with the planet. In case that was in any way unclear it is hard for me to even hold a pencil sometimes yet I draw.
Nobody cares what you want to hear... He learns in the way that is fastest for him, whats your problem with that?
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Noob here, with questions

Post by SinbadEV »

seriously smoth, quit being a douche... I would wager your disability is exactly what has driven you to such heights of awesomeness so settle down.
TassadarZeratul
Posts: 17
Joined: 26 Nov 2009, 14:26

Re: Noob here, with questions

Post by TassadarZeratul »

Okay, I think I've gotten most of this stuff figured out. I just need to know how to actually let the player give a custom order to a unit and I can figure the rest out.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Noob here, with questions

Post by smoth »

SinbadEV wrote:I would wager your disability is exactly what has driven you to such heights of awesomeness so settle down.
Don't you even fucking say that. I had to work many times harder than you normal faggots just to write my own godamn name! You couldn't possibly understand what it is like to have to put your knees on your godamn arm to write your own name and the humiliation that other kids gave me because of it.

I don't want to hear some fucking bullshit about how boo hoo you have no motivation or that I am somehow special when all of your body functions at your fucking command. I tried to be understanding and even motivating about your lack of self fucking initiative. That was fucking low of you.

No to draw was the last of my fucking concerns I wanted to write my godamn name. Don't even fucking trying and say some stupid shit like that. You have normal fucking hands that work right, this isn't some fucking comic book where people get superpowers or some bullshit to counter balance their godamn issues. This is real life where the buck stops at you and you alone.

My willpower has nothing to do with my hands or how they are messed up but I appreciate the low blow and I will be sure to return it.

TassadarZeratul: look at the smokescreen stuff in gundamrts. It should have what you need.
Post Reply

Return to “Game Development”