Page 1 of 1
How would I do this?
Posted: 26 Sep 2006, 04:27
by Blaze
Hello everyone. I really want to begin constructing my own RTS off of this amazing engine (have been designing it for over 2 years and have just recently decided this is what I wished to use). The only problem is I am unsure how to make units in squads or groups, ala Dawn of War or Company of Heroes (both great games). Instead of a single unit being built, I would need a group of 10 or so built at a time. They should be grouped together and all follow the same commands (like move or attack).
Can this be done, and if so, how?
thank you for your time!
Posted: 26 Sep 2006, 04:59
by Hunter0000
AFAIK...
Short answer: No
Long answer: Yes, but it will be lots of work for somthing that still looks shitty.
ATM Spring is just not designed to handle these types of 'units'
.. of course this mightave changed since it was last discussed... but I doubt it
Posted: 26 Sep 2006, 05:03
by Blaze
Hmmm.. Darn. Thats one of the main things I was looking for in an engine. Spring seems to have everything else I need other then that. Well, thank you for your reply. One last question, can you make it so structures simply produce multiple units at a time, then? Not grouped or anything, but say 5 or so units come out at once.
Thanks for your time.
Posted: 26 Sep 2006, 07:22
by SpikedHelmet
Yes. Holding SHIFT when you select a unit to build in the menu will qeue multiples of 5.
Last time I checked there is also a comprehensive unit behaviour AI thingy that lets you group units together, set formation and actions etc... 'bout as close as you'd get.
Posted: 26 Sep 2006, 07:29
by FizWizz
I'm not sure that is what he meant. Factories can only have one unit in production at any given time. So you can't have like 4 construction pads working on 4 different units at the same time. (would be cool, though).
Posted: 26 Sep 2006, 07:45
by Neddie
I think, in theory, you might be able to code a unit that builds as one but acts as four and thus allows you different construction bays, but it is uncharted territory...
Posted: 26 Sep 2006, 09:30
by KDR_11k
You could make a unit that looks like e.g. five tanks.
Posted: 26 Sep 2006, 17:56
by j5mello
Blaze wrote:Hmmm.. Darn. Thats one of the main things I was looking for in an engine. Spring seems to have everything else I need other then that. Well, thank you for your reply. One last question, can you make it so structures simply produce multiple units at a time, then? Not grouped or anything, but say 5 or so units come out at once.
Thanks for your time.
your asking that if i click a build pic you get 5 individual units to come out instead of just one? if so im not sure best to ask one of the more skilled modders...
Posted: 26 Sep 2006, 18:26
by Caydr
No
Posted: 26 Sep 2006, 19:25
by rattle
If you want groups they'll have to be one model and one unit. The major problem would be limited texture space with s3os (I assume you won't use face to face texturing) and it's a pain to script that unit, you'll need 5 different animation scripts (or you can use the same over and over again which may look dull). It IS possible but it's quite a lot of effort. But it's possible to make team members disappear when health reaches a certain value and reappear through scripting or upgrade their weaponry based on XP.
Posted: 26 Sep 2006, 21:37
by Blaze
Rattle is getting at what I would like to try. It would just be one unit, but there would visibly be several individual units making it up. I've been learning modeling and animating for awhile so I'm not worried about creating 5 different sets of animations.
Oh and you said that you could make the individual units dissapear after it reaches a certain health? Cool! Would there be a way to remove the unit and replace it by a corpse type unit (that of course would just stay and eventually dissapear where he fell, not follow the unit around still.
Thank you all for your time. If the above isn't possible or a practical method for this engine, then if I could make 1 structure (like a barracks) that produces 5 individual units at once, not in a que, that would be great.
Thanks.
Posted: 26 Sep 2006, 21:51
by Caydr
It's been done before, for some sort of infantry thing, and it was really cutting-edge. Multiple units, death of individual units when certain damages are reached, etc, but frankly it just looked like crap. Zwzygszysgggs.. whatever it is... he might come up with something, but don't expect a miracle. It's just not practical right now, is what I'm trying to say.
Posted: 26 Sep 2006, 21:54
by Aun
IIRC, GMN was working on something like this at first for Epic Legions. It would be probably be quite CPU intensive as well, btw.
Posted: 26 Sep 2006, 22:03
by rattle
Blaze wrote:Rattle is getting at what I would like to try. It would just be one unit, but there would visibly be several individual units making it up. I've been learning modeling and animating for awhile so I'm not worried about creating 5 different sets of animations.
Animating using BOS script? There are some tools to easen ones life which are using keyframes (sort of, upspring is getting this too) but I do them manually. It requires a lot of fiddling.
Blaze wrote:Oh and you said that you could make the individual units dissapear after it reaches a certain health? Cool! Would there be a way to remove the unit and replace it by a corpse type unit (that of course would just stay and eventually dissapear where he fell, not follow the unit around still.
No. There are functions called hide and show available in BOS script, they can show/hide parts (obiously). In order to let, say, team member one die, you'll let him either explode or use the new emit-sfx command stuff to get some blood spilled and then hide all of his parts (being the body, pelvis, arms, legs, head, current weapons, etc). Think of a tank with five guns. Tank loses guns as it loses health.
Blaze wrote:Thank you all for your time. If the above isn't possible or a practical method for this engine, then if I could make 1 structure (like a barracks) that produces 5 individual units at once, not in a que, that would be great.
Thanks.
What I meant was one unit consisting of the geomertry of five soldiers. It's still one unit. Your barracks produces one unit, not five in a group. All members of the group aren't able to move individually (well you could emulate that through scripting but it's painful). Members can't really die, they can disappear on health It's still the same unit, only a weapon or two got "disabled". It only looks like a squad of 5 soldiers. Lastly Spring isn't DoW but agreed, it'd be cool to have squads :)
Posted: 26 Sep 2006, 22:10
by esteroth12
don't forget, they will have to path together, they won't weave around obstacles and such
Posted: 26 Sep 2006, 22:10
by Blaze
Haha sorry, sometimes I'm horrible at making myself clear. I know what you meant, it's just 1 unit with the geometry of 5 soldiers. Thats exactly what I would like :) The other thing I was getting at would be just a structure that produces 5 units at once (not a squad or linked in any way, just 5 individual units that are created at once). But if the prior is possible then I'll take that route.
And lastly, anyone mind pointing me in the direction of where I could lean the scripting to perform such a fuction?
Thanks.
Posted: 26 Sep 2006, 22:24
by esteroth12
actually, that simple scripting... just pop open any script and you wil learn basic things... the TA nukes have show/hides...
if you know C, you will probably absorb the scripting language like water
Posted: 26 Sep 2006, 22:25
by rattle
esteroth12 wrote:don't forget, they will have to path together, they won't weave around obstacles and such
Hum right, they may look silly or need a very low turnrate. I think it's better to make 5 individual units or keep them in groups of two.
And no buildings can only produce one unit at a time. I started scripting some weeks ago and, erm, it's best to download other mods and take a look at how they did stuff, analyze it, experiment around etc.
http://taspring.clan-sy.com/phpbb/viewtopic.php?t=6015
Thread by smoth, info about making mods in general...
http://taspring.clan-sy.com/phpbb/viewtopic.php?t=3114
...and a list of modding tools by TA_3D.
You'll need Scriptor for BOS scripts (or can use cobbler as well but cobbler only compiles, Scriptor is a full blown slightly bugged editor and compiler). Everything concerning the unit is done through BOS script, which means aiming, animatiing and everything else. Unit stats and weapon stats are kept in different files however...
The BOS scripting language is fairly easy to learn if you're familiar with C. Take a look at the
wiki, a lot of information can be found there...