Noob here, with questions
Moderator: Moderators
-
- Posts: 17
- Joined: 26 Nov 2009, 14:26
Noob here, with questions
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?
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?
Re: Noob here, with questions
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.
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.
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Noob here, with questions
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).
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).
-
- Posts: 17
- Joined: 26 Nov 2009, 14:26
Re: Noob here, with questions
Woah, fast reply. ^________^
Anyone have a guide to creating these "gadgets"? (I'll check the wiki ofc.)
Thanks, guys. <3
Anyone have a guide to creating these "gadgets"? (I'll check the wiki ofc.)
Thanks, guys. <3
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Noob here, with questions
Around here people jump at the chance to tell people that games are really "games" not "mods".Woah, fast reply.
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.
Re: Noob here, with questions
it is an important distinction. I have explained this several times.Google_Frog wrote:Around here people jump at the chance to tell people that games are really "games" not "mods".Woah, fast reply.
@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.
-
- Posts: 17
- Joined: 26 Nov 2009, 14:26
Re: Noob here, with questions
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?
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?
Re: Noob here, with questions
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.
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.
-
- Posts: 17
- Joined: 26 Nov 2009, 14:26
Re: Noob here, with questions
So I should just look at Kernal Panic and Compete Annihilation's Lua scripts? That works, thanks.
Re: Noob here, with questions
. . . . this almost sounds like an excuse.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.
Re: Noob here, with questions
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 wrote:So I should just look at Kernal Panic and Compete Annihilation's Lua scripts? That works, thanks.
-
- Posts: 17
- Joined: 26 Nov 2009, 14:26
Re: Noob here, with questions
@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.
@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.
Re: Noob here, with questions
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:@smoth: But it's true. >.>
Read code ask questions.TassadarZeratul wrote:@above: Uhm, so what should I do now?
What? like all the projects who's source you can read?TassadarZeratul wrote: It would really help if I had some code snippets.
ok but you are trying to run track before you can even crawl.TassadarZeratul wrote: All I really need to know is how to create custom commands, like the "place nydus canal exit" one I mentioned above.
-
- Posts: 17
- Joined: 26 Nov 2009, 14:26
Re: Noob here, with questions
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: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:@smoth: But it's true. >.>
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:Read code ask questions.TassadarZeratul wrote:@above: Uhm, so what should I do now?
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:What? like all the projects who's source you can read?TassadarZeratul wrote: It would really help if I had some code snippets.
Explain. I would assume something this commonly done would be easy. Also, I am fluent in C++, and Lua seems pretty similar.smoth wrote:ok but you are trying to run track before you can even crawl.TassadarZeratul wrote: All I really need to know is how to create custom commands, like the "place nydus canal exit" one I mentioned above.
Re: Noob here, with questions
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.
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.
Re: Noob here, with questions
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'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.
Read code ask questions.TassadarZeratul wrote:I'm asking for example code so I can do that.
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: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.
you were given answers to that question GET CRACKINGTassadarZeratul 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.
"read the code and ask questions"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? >.>
if you were fluent in c++ you would not say that.TassadarZeratul wrote:Explain. I would assume something this commonly done would be easy. Also, I am fluent in C++, and Lua seems pretty similar.
Re: Noob here, with questions
Nobody cares what you want to hear... He learns in the way that is fastest for him, whats your problem with that?smoth wrote: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'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.
Re: Noob here, with questions
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.
-
- Posts: 17
- Joined: 26 Nov 2009, 14:26
Re: Noob here, with questions
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.
Re: Noob here, with questions
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.SinbadEV wrote:I would wager your disability is exactly what has driven you to such heights of awesomeness so settle down.
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.