Questions About Advanced Unit Functions -
Moderator: Moderators
-
- Posts: 4
- Joined: 29 May 2010, 06:57
Questions About Advanced Unit Functions -
Hey everyone. Just tossing up a quick list of questions that I have regarding a few areas of unit behavior that I'm curious about.
1. Can a mobile unit be constructed with a second unit permanently attached to it in order to implement multiple-part units in the game? If this is not possible, are there proven workarounds to provide similar behavior? (For instance, a tank with destructible tracks and turret, where the tracks and turret are technically separate entities with their own hit-boxes and hit-points, but act in unison through a permanent assist order or something to that effect.)
2. Can a weapon or other effect in the game change the course of another projectile?
3. Can a weapon or other effect in the game reduce the amount of damage that a projectile will do when it impacts a target, as opposed to reducing the damage on impact?
4. Have any mountable units been demonstrated where, in its unmounted state, the unit is immobile and can only pick up a valid unit to drive it (like a transport would) but when loaded with a driver, it becomes fully functional? Would such a feature be supported by the game as it is without extensive modification?
5. What is the best known way to cause units to check for actual line-of-sight?
6. Is it possible to cause a unit to alter its behavior when encountering rough terrain in the same way some amphibious units (like the Pelican) do when encountering water or land? Has this been demonstrated?
Thanks in advance to anyone who can answer these questions.
1. Can a mobile unit be constructed with a second unit permanently attached to it in order to implement multiple-part units in the game? If this is not possible, are there proven workarounds to provide similar behavior? (For instance, a tank with destructible tracks and turret, where the tracks and turret are technically separate entities with their own hit-boxes and hit-points, but act in unison through a permanent assist order or something to that effect.)
2. Can a weapon or other effect in the game change the course of another projectile?
3. Can a weapon or other effect in the game reduce the amount of damage that a projectile will do when it impacts a target, as opposed to reducing the damage on impact?
4. Have any mountable units been demonstrated where, in its unmounted state, the unit is immobile and can only pick up a valid unit to drive it (like a transport would) but when loaded with a driver, it becomes fully functional? Would such a feature be supported by the game as it is without extensive modification?
5. What is the best known way to cause units to check for actual line-of-sight?
6. Is it possible to cause a unit to alter its behavior when encountering rough terrain in the same way some amphibious units (like the Pelican) do when encountering water or land? Has this been demonstrated?
Thanks in advance to anyone who can answer these questions.
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Questions About Advanced Unit Functions -
1) not unless you use some complex lua, but you can do it easier with out secondary unit parts, with just some damage monitoring you can destroy specific parts of a unit, but they wont be specifically targeted,
2) shields maybe
3) shields again
4)can be done with a lua script, carrepair has something similar with riding animals and said he might make a vehicle/ driver script if i am a really good boy
5) I don't know what you mean by that, LOS to a target, LOS view radius??
6) Using lua you can detect terrain type but it wont be supported by all maps, alternatively you could easily just check the slope the unit is moving on and trigger some kind of transformation
2) shields maybe
3) shields again
4)can be done with a lua script, carrepair has something similar with riding animals and said he might make a vehicle/ driver script if i am a really good boy
5) I don't know what you mean by that, LOS to a target, LOS view radius??
6) Using lua you can detect terrain type but it wont be supported by all maps, alternatively you could easily just check the slope the unit is moving on and trigger some kind of transformation
Re: Questions About Advanced Unit Functions -
1 is easy with Lua actually, the Imperator in THIS does it.
3 isn't possible AFAIK, you can't track which projectile is doing the damage so you wouldn't know if it was tagged mid-flight.
4 is quite possible, AFAIK S44 did that with some things until they decided it's way too cumbersome and just used morphing.
5 is what the engine already does, no?
6 depends on your definition of rough terrain because the engine doesn't keep track of what's rough and what's not. If you want a different behaviour when encountering a certain slope steepness that's feasible.
3 isn't possible AFAIK, you can't track which projectile is doing the damage so you wouldn't know if it was tagged mid-flight.
4 is quite possible, AFAIK S44 did that with some things until they decided it's way too cumbersome and just used morphing.
5 is what the engine already does, no?
6 depends on your definition of rough terrain because the engine doesn't keep track of what's rough and what's not. If you want a different behaviour when encountering a certain slope steepness that's feasible.
-
- Posts: 916
- Joined: 27 Jun 2009, 01:32
Re: Questions About Advanced Unit Functions -
It's possible but I wouldn't call it easy to do. Actually someone from Spring1944 showed off a short demonstration video where you could highlight i.e. aim at certain parts of a tank (being turret, main body, tracks). I couldn't find that topic again though...1. Can a mobile unit be constructed with a second unit permanently attached to it in order to implement multiple-part units in the game?
That's pretty much not possible. There only exist shields which deflect i.e. push away projectiles of the plasma weapon type. But still you cannot just set things up in a way that projectiles will be deflected in a direction you wish...2. Can a weapon or other effect in the game change the course of another projectile?
Well you can give a unit a damagemodifier tag which reduces any damage the unit takes by a certain percentage once you "activate" the unit in its script. That of course decreases the damage taken by any weapon so if you just want the effect for one very special weapon this doesn't do what you wish...3. Can a weapon or other effect in the game reduce the amount of damage that a projectile will do when it impacts a target, as opposed to reducing the damage on impact?
There afaik exists a way to be as flexible as you want here by coding some logic for this via Lua. I don't know which functions to use anymore but I think there was something to get to know which weapon or at least which unit did hit you and you could play around with the dealt damage from that point on...
Last edited by Master-Athmos on 29 May 2010, 15:47, edited 1 time in total.
Re: Questions About Advanced Unit Functions -
I ran into certain behaviour difficulties with my targettable tank pieces stuff, felt like i was fighting the engine in some regards. Not saying it isn't possible with further work though. There are multiple approaches.
Re: Questions About Advanced Unit Functions -
Shields are a bit more versatile than that, they can deflect any projectile you tell them to (and also beamlaser shots). Some things may go wonky with the energy consumption but that aside you're good to go. If you really want to you can use Lua to mess with the velocities of non-missile projectiles.Master-Athmos wrote:There only exist shields which deflect i.e. push away projectiles of the plasma weapon type.
Damage modifier isn't the only way, there's the HitByWeaponID function and of course modifying stuff in UnitDamaged.
-
- Posts: 4
- Joined: 29 May 2010, 06:57
Re: Questions About Advanced Unit Functions -
Interesting.
About the shields:
1. Can the amount of deflection be changed? (For instance, the shield only alters the projectile's trajectory partway to cause it to miss the original target, but still pass by it.)
2. Can shields react differently to different weapon types?
About the shields:
1. Can the amount of deflection be changed? (For instance, the shield only alters the projectile's trajectory partway to cause it to miss the original target, but still pass by it.)
2. Can shields react differently to different weapon types?
- Pressure Line
- Posts: 2283
- Joined: 21 May 2007, 02:09
Re: Questions About Advanced Unit Functions -
1) maybe
2) yes
2) yes
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Questions About Advanced Unit Functions -
To expand on what others have said:
1. Sounds easy, just use a bit of movectrl. A KDR said look at the massive ship in THIS. http://www.springfiles.com/show_file.php?id=2324 <- THIS
2. Shields can change the course of projectiles, beyond that I am not sure.
3. No, I don't think it's possible to apply a damage change to a projectile. You can easily do anything to damage you want on impact.
2 and 3 may become possible if a ShieldHit callout was implemented.
4. This is very easy at a base level. Use units with no speed to act as the turrets and mobile transports with fireplatform = 1. It is shown in Blox http://www.springfiles.com/show_file.php?id=1057 (this particular game may not work as it's from an old Spring version)
5. Check for LOS for what purpose? Spring uses terrain hiding LOS so getUnitLosState should work.
6. With lua unit scripts you can do any kind of terrain point reading or typemap reading. It should be easy to change behaviour based on terrain.
1. Sounds easy, just use a bit of movectrl. A KDR said look at the massive ship in THIS. http://www.springfiles.com/show_file.php?id=2324 <- THIS
2. Shields can change the course of projectiles, beyond that I am not sure.
3. No, I don't think it's possible to apply a damage change to a projectile. You can easily do anything to damage you want on impact.
2 and 3 may become possible if a ShieldHit callout was implemented.
4. This is very easy at a base level. Use units with no speed to act as the turrets and mobile transports with fireplatform = 1. It is shown in Blox http://www.springfiles.com/show_file.php?id=1057 (this particular game may not work as it's from an old Spring version)
5. Check for LOS for what purpose? Spring uses terrain hiding LOS so getUnitLosState should work.
6. With lua unit scripts you can do any kind of terrain point reading or typemap reading. It should be easy to change behaviour based on terrain.
-
- Posts: 4
- Joined: 29 May 2010, 06:57
Re: Questions About Advanced Unit Functions -
In response to remarks about LOS checking:
I wasn't aware that units in Spring check to see if they can actually hit something before firing. I remember this behavior in OTA and didn't know it had been addressed in Spring. I'll be taking a look at the files suggested here, also.
I'll post more questions here as I come up with them. Thanks for your help so far, folks.
I wasn't aware that units in Spring check to see if they can actually hit something before firing. I remember this behavior in OTA and didn't know it had been addressed in Spring. I'll be taking a look at the files suggested here, also.
I'll post more questions here as I come up with them. Thanks for your help so far, folks.
Re: Questions About Advanced Unit Functions -
Spring units check if terrain is in the way and by default if a friendly is, too.
-
- Posts: 4
- Joined: 29 May 2010, 06:57
Re: Questions About Advanced Unit Functions -
I took a look at THIS. The Imperator is very interesting. Once I'm a little more acclimated with Spring I'll examine it in greater detail. Ideally, I'd like to attach a unit to a moving part of another unit, but I may have to settle for something less complicated instead.