Make a unit into a vehicle?
Moderator: Moderators
-
Tygr
- Corporal

- Posts: 150
- Joined: Mon Aug 25, 2008 1:11 pm
Make a unit into a vehicle?
I would like to make an extremely powerful dark trooper as a vehicle. Is there any way to do that? Because it would be very unbalanced if it were a unit.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Make a unit into a vehicle?
Try putting his ODF name in the vehiclespawn properties and see what happens.
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Make a unit into a vehicle?
but i doubt that it would work, the unit woul have to be a walker and walkers are incredilble complexTeancum wrote:it wouldnt be worth the effort put into it
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Make a unit into a vehicle?
Yep. That's the tough part. Walkers are not fun to do, and only ex-developers have every successfully built new ones for SWBF2.
- YouJediJunkie
- Command Sergeant Major

- Posts: 256
- Joined: Mon Mar 10, 2008 4:06 pm
Re: Make a unit into a vehicle?
I think MandaRek properly made one... Could have been a dream, but I am 99% sure that I saw it on the guy's YouTube channel.Teancum wrote:Yep. That's the tough part. Walkers are not fun to do, and only ex-developers have every successfully built new ones for SWBF2.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Make a unit into a vehicle?
Before this gets silly with supposition, I just want to point out that it doesn't matter whether we can make new walkers (which MandeRek has, as has been pointed out). Here's a link to the "Walker State Table," a doc on psych0fred's site:
http://www.secretsociety.com/forum/down ... eTable.txt
This covers mainly how walkers can move from one animation to the next, but it's also a handy reference to see what a walker can do - and you'll notice that aside from walking, it can't do anything a unit can - it can't jump (and would certainly have no animations for it if it could), it won't have weapon animations... the only thing it could duplicate that a unit can do is walking, and that's it.
You want to make a really powerful unit that isn't easily accessible? That you can do; just be creative in how you make the unit unlocked. You want to make a unit into a walker? Not going to happen. End of story.
http://www.secretsociety.com/forum/down ... eTable.txt
This covers mainly how walkers can move from one animation to the next, but it's also a handy reference to see what a walker can do - and you'll notice that aside from walking, it can't do anything a unit can - it can't jump (and would certainly have no animations for it if it could), it won't have weapon animations... the only thing it could duplicate that a unit can do is walking, and that's it.
You want to make a really powerful unit that isn't easily accessible? That you can do; just be creative in how you make the unit unlocked. You want to make a unit into a walker? Not going to happen. End of story.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Make a unit into a vehicle?
How about making him a dispensable vehicle for only a certain unit class on both teams? You could have a special region that, when entered, would add the weapon to the unit's ODF. Is there a way to modify ODF's in the middle of a game like that? Then, you could make it so that ammo drops don't giev ammo for this specific weapon (not sure how to do that, look in the engineer's health/ammo drop odf, maybe?) So the result would be that upon entering a certain region, you'd unlock this weapon that you would have 1 ammo of, and it'd be this special dark trooper.
The downside is that you'd have to only have ammo droids inside that special region, or else the unit that can dispense the dark trooper would be able to refill from any old ammo droid. Or, is there a sort of region that can refill ammo, perhaps via an OnEnterRegion LUA command? If so, you could put that region inside the "unlock the weapon" region, and set the weapon's ODF so that it was impossible to refill via ammo droid or ammo drop (again, take a look, maybe at the engineer's health/ammo drop ODF and see if you can adapt some lines in there).
Would this semi-work?
The downside is that you'd have to only have ammo droids inside that special region, or else the unit that can dispense the dark trooper would be able to refill from any old ammo droid. Or, is there a sort of region that can refill ammo, perhaps via an OnEnterRegion LUA command? If so, you could put that region inside the "unlock the weapon" region, and set the weapon's ODF so that it was impossible to refill via ammo droid or ammo drop (again, take a look, maybe at the engineer's health/ammo drop ODF and see if you can adapt some lines in there).
Would this semi-work?
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Make a unit into a vehicle?
No.Fiodis wrote:Would this semi-work?
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Make a unit into a vehicle?
Ok, care to explain why not?
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Make a unit into a vehicle?
Fiodis wrote:Ok, care to explain why not?
can you script like him?
then dont ask him to explain why something doesnt work you have no idea of!
or better: explain him the circumstances why it should work
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Make a unit into a vehicle?
Look, if people don't ask questions, they don't learn. Mav's one of the best. Hence, I ask him questions. Ok, so an idea of mine doesn't work. But why? How am I supposed to know what to avoid in the future?
Mav, please don't be offended by my desire to learn.
Mav, please don't be offended by my desire to learn.
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Make a unit into a vehicle?
but its not possible!
what do you want to learn?
do you expect mav to explain you the whole scripting and odfsystem to explain why it doesnt work?
what do you want to learn?
do you expect mav to explain you the whole scripting and odfsystem to explain why it doesnt work?
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Make a unit into a vehicle?
Why it isn't possible. I do not wish Mav to explain all of the world of scripting (that's what tutorials are for). I only ask to know why this particular setup is impossible. Is it because you can't change a unit's ODF via LUA? I thought you could....
Last edited by Fiodis on Thu Jan 29, 2009 5:12 pm, edited 1 time in total.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Make a unit into a vehicle?
I don't mind explaining-DarthD.U.C.K. wrote:Fiodis wrote:Ok, care to explain why not?![]()
can you script like him?
then dont ask him to explain why something doesnt work you have no idea of!
or better: explain him the circumstances why it should work
Problems with your idea:
1) To modify an .odf and have it change requires a specific set of circumstances in the unit setup, which isn't always easy to work around.
2) If you modify an .odf on-the-fly, you have to respawn (or enter a spawn point) to have the change take effect. You can work around this, but it's sloppy.
3) All this "ammo" nonsense is just that, nonsense. Even if the above would work, it would be better to just remove the weapon.
4) Adding a weapon to a unit adds the weapon to all units of that class.
5) Spawning a troop as a weapon isn't something I would recommend at all; as it can and will cause CTDs if not carefully used (and there is no way around this). I've done it before but don't know if I would do it again; it creates a very specific problem that you have to tell people how to work around.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Make a unit into a vehicle?
4. I had in mind that there would be a max of 1-2 units per team with this weapon.
5. Yeah, I know what you mean. I am doing this in the BrutalFront mod, and it does cause a CTD if you attempt to launch another one before the first one's body has faded away.
As for the others, now I understand. Thank you.
5. Yeah, I know what you mean. I am doing this in the BrutalFront mod, and it does cause a CTD if you attempt to launch another one before the first one's body has faded away.
As for the others, now I understand. Thank you.
